Skip to content

Commit cc1cb2f

Browse files
NullVoxPopuliclaude
andcommitted
Enable classicEmberSupport() for compat-build scenarios
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) <[email protected]>
1 parent c2d24e8 commit cc1cb2f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test-app/vite.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { defineConfig } from 'vite';
2-
import { extensions, ember, hbs } from '@embroider/vite';
2+
import { extensions, ember, hbs, classicEmberSupport } from '@embroider/vite';
33
import { babel } from '@rollup/plugin-babel';
44

55
export default defineConfig({
66
plugins: [
7+
...(process.env.ENABLE_COMPAT_BUILD ? [classicEmberSupport()] : []),
78
hbs(),
89
ember(),
910
babel({

0 commit comments

Comments
 (0)