Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"import * as ... from ..." syntax breaks when upgrading from ember-auto-import 2.6.3 to 2.7.2 #610

Open
steveszc opened this issue Feb 12, 2024 · 2 comments

Comments

@steveszc
Copy link

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.

@NullVoxPopuli
Copy link
Contributor

Is this related to: ef4/babel-import-util#11 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants