Skip to content

Raise a descriptive error for stylesheet tags on Vite-based apps - #34

Merged
tricknotes merged 1 commit into
mainfrom
vite-stylesheet-tags-error
Aug 22, 2026
Merged

Raise a descriptive error for stylesheet tags on Vite-based apps#34
tricknotes merged 1 commit into
mainfrom
vite-stylesheet-tags-error

Conversation

@tricknotes

Copy link
Copy Markdown
Owner

include_ember_stylesheet_tags only supports classic (Broccoli-based) applications: its lookup resolves stylesheets against dist/assets/, which cannot resolve the /@embroider/virtual/* stylesheet references a Vite build leaves in index.html. Calling it for a Vite-based application therefore failed with a confusing "Failed to find assets matching" error.

It is also unnecessary there: since 0.8.0, include_ember_script_tags emits everything a Vite-based application needs to boot, stylesheet tags included.

Raise EmberCli::Assets::NotSupportedError with a message that points at include_ember_script_tags instead, and document how the helpers apply to each build system in the README.

`include_ember_stylesheet_tags` only supports classic (Broccoli-based)
applications: its lookup resolves stylesheets against `dist/assets/`,
which cannot resolve the `/@embroider/virtual/*` stylesheet references a
Vite build leaves in `index.html`. Calling it for a Vite-based
application therefore failed with a confusing "Failed to find assets
matching" error.

It is also unnecessary there: since 0.8.0, `include_ember_script_tags`
emits everything a Vite-based application needs to boot, stylesheet tags
included.

Raise `EmberCli::Assets::NotSupportedError` with a message that points
at `include_ember_script_tags` instead, and document how the helpers
apply to each build system in the README.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tricknotes
tricknotes merged commit 8f81086 into main Aug 22, 2026
8 of 9 checks passed
@tricknotes
tricknotes deleted the vite-stylesheet-tags-error branch August 22, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants