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
It seems that for whatever reason Webpack exposes the moment dependency differently with 2.25.0 than prior versions of moment.js. eg. 2.24.0 works fine. Others have reported issues building with 2.25.0 and Webpack (eg. moment/moment#5486, moment/moment#5489, moment/moment#5491) so it does appear that something about the packaging has changed. The moment team, to their credit, released a hotfix today, but upgrading to the 2.25.1 hotfix did not resolve our issue.
In brief, it seems that moment is suddenly being exposed as an ES6 dependency with a "default" export to our older code that uses require and define dependencies. The obvious fix is to just use moment.default in the places in our source where we are using require or define to import it. This introduces another problem however, because moment-timezone does not support es6 modules and Webpack. There has been an outstanding issue since 2017 about this.
The text was updated successfully, but these errors were encountered:
It seems that for whatever reason Webpack exposes the moment dependency differently with 2.25.0 than prior versions of moment.js. eg. 2.24.0 works fine. Others have reported issues building with 2.25.0 and Webpack (eg. moment/moment#5486, moment/moment#5489, moment/moment#5491) so it does appear that something about the packaging has changed. The moment team, to their credit, released a hotfix today, but upgrading to the 2.25.1 hotfix did not resolve our issue.
In brief, it seems that moment is suddenly being exposed as an ES6 dependency with a "default" export to our older code that uses
require
anddefine
dependencies. The obvious fix is to just use moment.default in the places in our source where we are usingrequire
ordefine
to import it. This introduces another problem however, because moment-timezone does not support es6 modules and Webpack. There has been an outstanding issue since 2017 about this.The text was updated successfully, but these errors were encountered: