Closed JamesLMilner closed 5 years ago
When running npm run build after running npm install, the build will fail because config.plugins is never defined as an array. The fix is just to check if it's undefined and make it an array if so.
npm run build
npm install
Here is the error:
Running "concurrent:build" (concurrent) task Running "hexo:generate" (hexo) task Running "docviewer:build" (docviewer) task /home/james/Code/SitePen/dojo/dojo.io/docviewer/webpack.config.ts:31 config.plugins!.push(new optimize.UglifyJsPlugin()); ^ TypeError: Cannot read property 'push' of undefined
When running
npm run build
after runningnpm install
, the build will fail because config.plugins is never defined as an array. The fix is just to check if it's undefined and make it an array if so.Here is the error: