猿问

​webpack打包错误

Administrator@0EY8ABBZY94NN0X MINGW64 /f/mmall/doc/mmall-fe (mmall_v1.0)

$ webpack ./src/page/index/index.js ./dist/app.js

Hash: 2b1a5b7053ec546aae6d

Version: webpack 4.12.1

Time: 100ms

Built at: 2018-06-27 14:38:22

 1 asset

[0] ./src/page/index/cats.js 61 bytes {0} [built]

[1] ./src/page/index/index.js 48 bytes {0} [built]

[2] multi ./src/page/index/index.js ./dist/app.js 40 bytes {0} [built]


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 ./src/page/index/index.js ./dist/app.js

Module not found: Error: Can't resolve './dist/app.js' in 'F:\mmall\doc\mmall-fe'

 @ multi ./src/page/index/index.js ./dist/app.js


灬似水逍遥
浏览 2826回答 3
3回答

你说2016

这里提示问题是没有配置webpack的mode选项,默认有production和development两种模式可以设置,可以设为development模式,在命令行输入:webpack --mode development
随时随地看视频慕课网APP
我要回答