script/build fails with file not found
david-pfx opened this issue · 2 comments
david-pfx commented
The error is
Module not found: Error: Can't resolve 'widgets/PageNotFound.js' in ...
I think the alias in config\webpack.config.dev.js
is missing from config\webpack.config.prod.js
. I tried fixing that, but then there are more.
david-pfx commented
Added these two aliases:
widgets: path.resolve(__dirname, '../src/components/widgets/'),
utils: path.resolve(__dirname, '../src/utils/'),
Now the error is 'failed to minify'.
Failed to minify the code from this file:
./node_modules/query-string/index.js:8
Read more here: http://bit.ly/2tRViJ9
I upgraded react-scripts, but it didn't fix the problem. Over to you.
evoluteur commented
I went back to using react-scripts and stopped using webpack aliases. It fixed the issue.