Closed patricklx closed 6 months ago
Can we add a test that runs our plugin and babel-plugin-transform-typescript together so that we don't regress on this bug?
Can we add a test that runs our plugin and babel-plugin-transform-typescript together so that we don't regress on this bug?
We have it already https://github.com/emberjs/babel-plugin-ember-template-compilation/blob/5fceb59b20bc8cf688d8f18fefde1c774eaa1b76/__tests__/tests.ts#L1847
We probably would need another plugin that wants to use the imports.
We have it already
it wasn't failing? :sweat_smile:
We have it already
it wasn't failing? 😅
No, because it's not a problem of ts plugin + this plugin. But a problem of ts plugin + other plugin+ this plugin.
Updated the description
Let me rephrase my question: can we add a test they would fail without these changes?
@ef4 added a test
Thanks, I found a way to use babel's scope.crawl()
to update bindings for only the sub-trees of the AST that we're altering.
run the processing in pre to ensure we have the imports before other plugin runs.
fixes https://github.com/embroider-build/ember-auto-import/issues/611