为了账号安全,请及时绑定邮箱和手机立即绑定

​webpack打包错误

​webpack打包错误

Administrator@0EY8ABBZY94NN0X MINGW64 /f/mmall/doc/mmall-fe (mmall_v1.0)$ webpack ./src/page/index/index.js ./dist/app.jsHash: 2b1a5b7053ec546aae6dVersion: webpack 4.12.1Time: 100msBuilt 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 configurationThe '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.jsModule not found: Error: Can't resolve './dist/app.js' in 'F:\mmall\doc\mmall-fe' @ multi ./src/page/index/index.js ./dist/app.js
查看完整描述

3 回答

?
你说2016

TA贡献12条经验 获得超2个赞

这里提示问题是没有配置webpack的mode选项,默认有production和development两种模式可以设置,可以设为development模式,在命令行输入:

webpack --mode development

查看完整回答
反对 回复 2018-06-27
  • 灬似水逍遥
    灬似水逍遥
    输入之后还是有错误。 $ webpack --mode development Insufficient number of arguments or no entry found. Alternatively, run 'webpack(-cli) --help' for usage info. Hash: e15624eaf009aea419da Version: webpack 4.12.1 Time: 45ms Built at: 2018-06-27 21:27:11 ERROR in Entry module not found: Error: Can't resolve './src' in 'F:\mmall\doc\mmall-fe'
  • 你说2016
    你说2016
    你把配置文件贴出来看一看
  • 灬似水逍遥
    灬似水逍遥
    { "name": "mmall-fe", "version": "1.0.0", "description": "mall\u001b[D\u001b[D\u001b[D\u001b[Dm\u001b[C\u001b[Dmall\u001b[前端代码", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git@gitee.com:wzdddhappymmall/mmall-fe.git" }, "author": "Devil", "license": "ISC", "devDependencies": { "webpack": "^4.12.2", "webpack-cli": "^3.0.8" } }
点击展开后面2
  • 3 回答
  • 0 关注
  • 2825 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信