在使用webpack打包时发现报了下面的错
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/
ERROR in multi ./hello.js hello.bundle.js
Module not found: Error: Can't resolve 'hello.bundle.js' in '/Applications/MAMP/htdocs/test.com/webpack-test'
@ multi ./hello.js hello.bundle.js main[1]
这是因为webpack4之后对语法更加严格的原因,解决办法
webpack hello.js --output-filename hello.bundle.js --mode development