[Bug] 5.6: ember-template-compiler cannot used Application.initializer, as it could not be a function, and also: <...>.Test is undefined
🐞 Describe the Bug
A clear and concise description of what the bug is.
😕 Actual Behavior
error
🤔 Expected Behavior
template-compiler loads at runitme.
(I know this'll be fixed by the new runtime compiler, but that isn't available yet, so folks needing to use runtime compilation must stay on, at newest, ember-source 5.5)
🌍 Environment
- Ember: - 5.6
➕ Additional Context
Loaded via: ember-cli-build.js (with embroider / webpack)
// Adds:
// - ember-template-compiler
// - @glimmer/syntax
app.import('vendor/ember/ember-template-compiler.js');
staticAddonTrees: true,
staticAddonTestSupportTrees: true,
staticHelpers: true,
staticModifiers: true,
staticComponents: true,
staticEmberSource: true,
staticAppPaths: ['utils'],
this is resolved if statkcEmberSource is turned off
So this is a problem only under Embroider? I didn't see such an issue in my case using ember-cli.
yeah, older ember-cli ships everything in node_modules, and there is no staticEmberSource option :sweat_smile:
Looks like this happens for tests, too:
Uncaught TypeError: ember__WEBPACK_IMPORTED_MODULE_6__.default.Test is undefined
setupTestAdapter index.js:123
start index.js:203
js test-helper.js:13
Webpack 7
[index.js:123:36](webpack://docs-app/src/index.js)
Uncaught Error: The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js".