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

Moment 2.25.0 breaks build #2999

Closed
akhenry opened this issue May 1, 2020 · 2 comments · Fixed by #3000
Closed

Moment 2.25.0 breaks build #2999

akhenry opened this issue May 1, 2020 · 2 comments · Fixed by #3000
Assignees

Comments

@akhenry
Copy link
Contributor

akhenry commented May 1, 2020

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.

@jvigliotta
Copy link
Contributor

Verified 5/12/2020

@akhenry
Copy link
Contributor Author

akhenry commented May 12, 2020

Verified fixed, 05/12/2020

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

Successfully merging a pull request may close this issue.

2 participants