webpack图片的时候报错?
来源:3-7 webpack对icon-font和图片的处理
北斗神拳1984
2018-11-09
ERROR in ./src/image/banner1.jpg
Module build failed: Error: emitFile is required from module system
at Object.module.exports (/Users/shenjunwei/mall/doc/mall-fe/node_modules/file-loader/index.js:10:27)
at Object.loader (/Users/shenjunwei/mall/doc/mall-fe/node_modules/url-loader/dist/index.js:76:19)
@ ./~/css-loader!./src/page/index/index.css 7:206-240
2回答
-
北斗神拳1984
提问者
2018-11-09
shenjunweideMacBook-Pro:mall-fe shenjunwei$ cat package.json
{
"name": "mall-fe",
"version": "1.0.0",
"description": "mmall前端代码",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@gitee.com:shenjw2018/mall-fe.git"
},
"author": "shenjw",
"license": "ISC",
"devDependencies": {
"css-loader": "^1.0.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.11.1",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"style-loader": "^0.23.1",
"url-loader": "^1.1.2",
"webpack": "^1.15.0"
},
"dependencies": {}
}
装了,之前没装,提示
Module build failed: Error: Cannot find module 'file-loader'
032018-11-13 -
Rosen
2018-11-09
file-loader 没装?看看源代码里的 package.json文件跟你多有什么不一样
012018-11-09
相似问题