You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 simplerimport 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.The text was updated successfully, but these errors were encountered: