dojo / dojo.io

Dojo - source for the dojo.io website
Other
17 stars 43 forks source link

docviewer build task fails because Webpack plugins is not defined in config #480

Closed JamesLMilner closed 5 years ago

JamesLMilner commented 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.

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

screenshot_20181026_155711