Support Ember apps generated with the Vite-based blueprint - #652
Merged
Conversation
ember-cli >= 6.8 generates applications that are built with Vite instead of the classic Broccoli-based pipeline. Support both build systems, detecting the Vite-based one by the presence of a vite.config.* file in the Ember application's root. `ember build` and `ember test` keep working for Vite-based applications (they delegate to `vite build` via `@embroider/compat`), so the command layer is unchanged. The differences are: * `ember-cli-rails-addon` is incompatible with the Vite-based build: it forces `storeConfigInMeta` off, which Embroider no longer supports, and it ships an initializer that imports the removed `ember` module. Vite-based applications must not install it. * Without the addon there is no build lock, so in development a Vite-based application is built synchronously on first request instead of being rebuilt with `ember build --watch`. * `include_ember_script_tags` and `include_ember_stylesheet_tags` are not supported for Vite-based applications: their output uses ES module script tags and loads its configuration from a meta tag in the generated index.html, neither of which the helpers can inject. Use `render_ember_app` instead. The dummy application's blueprint version is now selectable with the EMBER_VERSION environment variable (default 7.0.0), and CI covers the classic build with 5.12.0 and 6.7.2 alongside the full matrix on 7.0.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The `build (4.0, main, 7.0.0)` job fails while loading the spec files,
before any example runs:
An error occurred while loading ./spec/features/user_views_ember_app_spec.rb.
FrozenError:
can't modify frozen Hash: {}
The failure comes from an incompatibility between rspec-rails 6.1.5 and
the current rails/rails main branch, not from this repository's code:
requiring `rspec/rails` eagerly loads `action_view/test_case` and
`action_controller/base` before the dummy application initializes (Rails
main warns ":action_controller was loaded before application
initialization" and ":action_view_test_case was loaded before
application initialization"), and defining the first feature example
group then hits the FrozenError.
rspec-rails 6.x is the newest series the gemspec allows
(`rspec-rails >= 3.6.0, < 7.0`), so the job cannot be fixed without
first upgrading that dependency to a series that supports Rails main.
Comment the job out until then instead of letting it fail on every run.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tricknotes
force-pushed
the
support-vite
branch
from
August 22, 2026 03:28
d7507f1 to
4333e54
Compare
ember-cli-rails-assets 0.8.0 makes `include_ember_script_tags` work for Vite-based applications: it extracts the configuration meta tag, the stylesheet and modulepreload links, and the ES module script tags from the generated index.html. Require that version and drop the skip that marked the asset-helpers feature spec as unsupported on Vite. `include_ember_stylesheet_tags` is still classic-only (its stylesheet lookup cannot resolve the `/@embroider/virtual/*` references in a Vite build), and it is unnecessary on Vite because the script-tags helper already emits the stylesheets. The dummy application's view now calls it only for classic builds, and the documentation describes the same usage. Verified locally against both blueprints: 93 examples, 0 failures each with ember-new-output 7.0.0 (Vite) and 6.7.2 (classic). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ember-cli >= 6.8 generates applications that are built with Vite instead of the classic Broccoli-based pipeline. Support both build systems, detecting the Vite-based one by the presence of a vite.config.* file in the Ember application's root.
ember buildandember testkeep working for Vite-based applications (they delegate tovite buildvia@embroider/compat), so the command layer is unchanged. The differences are:ember-cli-rails-addonis incompatible with the Vite-based build: it forcesstoreConfigInMetaoff, which Embroider no longer supports, and it ships an initializer that imports the removedembermodule. Vite-based applications must not install it.ember build --watch.include_ember_script_tagsandinclude_ember_stylesheet_tagsare not supported for Vite-based applications: their output uses ES module script tags and loads its configuration from a meta tag in the generated index.html, neither of which the helpers can inject. Userender_ember_appinstead.The dummy application's blueprint version is now selectable with the EMBER_VERSION environment variable (default 7.0.0), and CI covers the classic build with 5.12.0 and 6.7.2 alongside the full matrix on 7.0.0.