ember-auto-import
ember-auto-import copied to clipboard
"import * as ... from ..." syntax breaks when upgrading from ember-auto-import 2.6.3 to 2.7.2
I am not sure if this is necessarily an ember-auto-import issue or a issue in one of ember-auto-import's dependencies (babel, or rollup or webpack?) but this surfaced when upgrading ember-auto-import from 2.6.3 to 2.7.2.
In our app we had a handful of files that were using import * as moment from 'moment-timezone' style imports to import CJS packages. I don't think we had a good reason to use this style import over a simpler import moment from 'moment-timezone', syntax, but none-the-less these worked fine with ember-auto-import 2.6.3 and earlier.
When we upgrade ember-auto-import to 2.7.2 these imports started breaking and we would see errors such as TypeError: moment is not a function
The easy solution was just to update the import syntax to no longer use import * as ... but I am curious to understand what caused these to break.
Is this related to: https://github.com/ef4/babel-import-util/pull/11 ?
looks related to es compat? https://github.com/embroider-build/ember-auto-import/pull/605/files#diff-3a79965de85ce107b5e10ede63afb2b4e5009f66a7839d4b2830ca62641b73b9L44