webpack ./src/page/index/index.js ./dist/app.js出问题

来源:3-4 npm和webpack的初始化

uuugggd

2019-09-23

hp@DESKTOP-0EVAHJJ MINGW64 ~/Desktop/shopping/doc/mmall-fe (mmall_v1.0)
$ webpack ./src/page/index/index.js ./dist/app.js
Hash: a7615eb27b25572e27bb
Version: webpack 4.40.2
Time: 108ms
Built at: 2019-09-23 19:00:05
Asset Size Chunks Chunk Names
app.js 1.04 KiB 0 [emitted] main
Entrypoint main = app.js
[0] multi ./src/page/index/index.js ./dist/app.js 40 bytes {0} [built]
[1] ./src/page/index/index.js 48 bytes {0} [built]
[2] ./src/page/index/cats.js 61 bytes {0} [built]
[3] ./dist/app.js 0 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/configuration/mode/

写回答

1回答

Rosen

2019-09-23

webpack版本用的新版本的,不支持这个命令了

0
2
Rosen
回复
uuugggd
如果对webpack不太熟练还是建议用会课程里的版本,熟悉了再去升级一下。用最新版本的话就直接往下进行吧,用配置文件进行配置
2019-09-26
共2条回复

真实数据对接 从0开发前后端分离的企业级上线项目

【毕设项目精品】前端实战,对接真实服务端数据,开发完整项目

4262 学习 · 4113 问题

查看课程