老师,我的怎么没生成dist这个文件夹及内容

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

xifenzs

2018-04-23

写回答

2回答

xifenzs

提问者

2018-04-26

Hash: a048ac86f82c2ec36bd0

Version: webpack 4.6.0

Time: 125ms

Built at: 2018-04-26 00:46:58

 1 asset

Entrypoint main = main.js

[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 'D:\git\mmall-fe'

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


0
2
Rosen
回复
xifenzs
npm ls webpack -g看你是不是装的4.x的版本,是的话换成1.15.0的
2018-04-27
共2条回复

Rosen

2018-04-25

执行webpack-dev-server后的编译结果是在内存里,不会有文件生成

如果执行webpack后没有生成,那就是报错了或者路径不对

0
0

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

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

4262 学习 · 4113 问题

查看课程