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

module not found:error:can't resolve‘./components/layer/layer.js’ in webpack-demo/src/app,js什么意思?

如题module not found:error:can't resolve‘./components/layer/layer.js’ in webpack-demo/src/app,js什么意思?,使用babel转换ES6

正在回答

5 回答

试过了,就是第一个答案,需要这样写

webpack --mode development src/index.js --output-filename app.js --output-path dist


1 回复 有任何疑惑可以回复我~

webpack --mode production src/main.js --output-filename app.bundle.js --output-path dist

4.0以后需要写 --output-filename和--output-path


2 回复 有任何疑惑可以回复我~

请问你这个是怎么解决的?我在编译sass文件的时候也遇到了这个报错

0 回复 有任何疑惑可以回复我~

resolve方法最后得到一个绝对路径,你这俩合不出一个绝对路径,是因为你的.打成,了吗

0 回复 有任何疑惑可以回复我~
#1

新旅程0 提问者

已经解决了,但不是这个问题,
2017-03-16 回复 有任何疑惑可以回复我~
#2

gulang6839 回复 新旅程0 提问者

请问你怎么解决的?
2017-10-14 回复 有任何疑惑可以回复我~
#3

雨穆

怎么解决的?
2018-03-08 回复 有任何疑惑可以回复我~
#4

慕粉4402726 回复 雨穆

我的解决了,是路径引入方式问题。
2018-03-14 回复 有任何疑惑可以回复我~
查看1条回复

举报

0/150
提交
取消

module not found:error:can't resolve‘./components/layer/layer.js’ in webpack-demo/src/app,js什么意思?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信