1、TypeError: webpack.optimize.OccurenceOrderPlugin is not a constructor
此问题出现在webpack 3中,解决办法很简单,将occurenceOrderPlugin改为OccurrenceOrderPlugin即可。
2、ReferenceError: rm is not defined
在build.js中,引入:
require('shelljs/global')
3、WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.resolve.extensions[0] should not be empty.
-> A non-empty string
resolve: { extensions: ['', '.js', '.jsx'] }, //删除:'',改为: resolve: { extensions: ['.js',