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

Add info about webpack and react, Error: Can't resolve './locale' #163

Open
developerium opened this issue Jan 31, 2019 · 1 comment
Open

Comments

@developerium
Copy link

developerium commented Jan 31, 2019

Hi guys, thanks for the great work here

I'm using your repo in a react project which is bundled with webpack.
I was having an issue where I got the error :

./node_modules/moment/src/lib/locale/locales.js Module not found: Error: Can't resolve './locale' in '/path/to/my/project/node_modules/moment/src/lib/locale'

I wanted to let you know it was related to moment repo, and got it fixed by adding
alias: { moment$: 'moment/moment.js', // https://github.com/moment/moment/issues/2979 },

to resolve section of webpack config

It is discussed in here.

Please include this in your docs.

Have a nice day

@developerium developerium changed the title Add info about webpack and react Add info about webpack and react, Error: Can't resolve './locale' Jan 31, 2019
@ramyareye
Copy link

I tried this hard code for now

https://github.com/jalaali/moment-jalaali/pull/160/files

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

2 participants