Conversation
748e0ad to
b6ef91f
Compare
|
Thanks for the reproduction branch. This description of the bug is incorrect:
We only physically emit the scope bag form when we're doing addon compilation. In an app we skip directly from the eval-form to wire format. That is the whole reason eval-form exists: it's cheap and it avoids the cost of ever separately computing the scope bag when we're trying to go straight to wire format anyway. This bug is a duplicate of emberjs/babel-plugin-ember-template-compilation#30 The dummy app in ember-template-imports uses |
|
(FWIW, I don't know why the dummy app uses enableTypescriptTransform, because it doesn't seem to include any typescript, and if you turn that flag off you can make your reproduction test pass. But this is a real bug anyway for apps that actually do need typescript.) |
|
This should be fixed in babel-plugin-ember-template-compilation 2.2.1. |
7e1acd6 to
28f9a4c
Compare
| "qunit-dom": "^3.0.0", | ||
| "release-it": "^16.2.1", | ||
| "typescript": "^4.5.2", | ||
| "typescript": "^4.9.5", |
There was a problem hiding this comment.
required by release-it for some reason
| "@typescript-eslint/eslint-plugin": "^6.8.0", | ||
| "@typescript-eslint/parser": "^6.8.0", | ||
| "ember-auto-import": "^2.6.3", | ||
| "ember-cli": "~4.12.1", |
There was a problem hiding this comment.
this version isn't compat with ember-qunit v8
| "@glimmer/component": "^1.0.3", | ||
| "@glimmer/component": "^1.1.2", | ||
| "@glimmer/syntax": "0.84.3", | ||
| "@glimmer/tracking": "^1.0.3", |
There was a problem hiding this comment.
sufficiently modern ember-source requires these changes
Initial failing test here: #206
Issue: #207
Blocked by: emberjs/babel-plugin-ember-template-compilation#30
The problem is that we're doing the "lazy way" of compiling, where we don't produce the
scopebag:prior to this PR, the added test is converted
the imports are correct --
onis there.However,
eval(arguments[0])doesn't use the needed scope:When compiling to something runnable, the resulting code is:
now this looks like it should work, but
ondoesn't exist in our AMD format.the
definemodule has:which omits
@ember/modifier-- likely due to the default babel transform knowing thateval(arguments[0])needs template parsing to figure out what imports need.