Enable classicEmberSupport() for compat-build scenarios#319
Merged
NullVoxPopuli merged 3 commits intoember-cli:nvp/its-vite-timefrom Apr 19, 2026
Conversation
The min-supported, ember-lts-4.12, and ember-lts-5.12 try-scenarios all
set ENABLE_COMPAT_BUILD=true and install @embroider/compat + ember-auto-import
so they can exercise the classic Ember 4.x/5.12 resolution path. The compat
scenario was failing with:
[vite]: Rollup failed to resolve import "ember-testing" from
"test-app/tests/index.html?html-proxy&index=0.js".
`tests/index.html` has `<script type="module">import "ember-testing";</script>`
which is a bare specifier that needs the classic resolver. In the default
build, `ember()` is enough, but the compat path requires
`classicEmberSupport()` (see ef4/memory-scroll vite.config.mjs for the
reference pattern).
Spread `classicEmberSupport()` into plugins only when ENABLE_COMPAT_BUILD is
set, matching the pattern already used by the try scenarios themselves.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
test-app/package.json has "type": "module", so an ember-cli-build.js file would be parsed as ESM. The generated content is CommonJS (require / module.exports), so the file needs a .cjs extension to be interpreted correctly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1512bf9
into
ember-cli:nvp/its-vite-time
18 of 20 checks passed
Open
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.
Summary
Fixes the three red try-scenarios on #317 —
min-supported,ember-lts-4.12,ember-lts-5.12— which were failing at the vite build step with:All three scenarios set
ENABLE_COMPAT_BUILD=trueand swap in a classicember-cli-build.jsthat usescompatBuildfrom@embroider/compat.test-app/tests/index.htmlhas<script type="module">import "ember-testing";</script>, a bare-specifier import that only resolves whenclassicEmberSupport()from@embroider/viteis active. In the default (non-compat) buildember()alone is enough, which is whyember-latest,ember-lts-6.4,ember-beta, andember-alphaare all green.Spread
classicEmberSupport()into the plugin list only whenENABLE_COMPAT_BUILDis set, matching the pattern inef4/memory-scroll/vite.config.mjs:Test plan
min-supported,ember-lts-4.12,ember-lts-5.12jobs all go greenember-latest,ember-lts-6.4,ember-beta,ember-alpha) remain green —classicEmberSupport()is only spread in whenENABLE_COMPAT_BUILD=trueTests (chrome|firefox)andFloating Dependenciesjobs (which don't set the env var) are unaffected🤖 Generated with Claude Code