这是我的配置文件
const path=require('path');
module.exports={
entry:'./src/index.js',
output:{
filename:"bundle.js",
path:path.resolve(__dirname,'dist')
},
module:{
rules:[
{
test:'/\.css$/',
use:[
'style-loader',
'css-loader'
]
}
]
}
};
这是配置和依赖的插件配置
{
"name": "webpack-demo",
"version": "1.0.0",
"description": "",
"main": "webpack.config.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"lodash": "^4.17.4"
},
"devDependencies": {
"css-loader": "^0.28.7",
"style-loader": "^0.19.0"
}
}
我使用 npm run build 进行打包但是出现如下错误不知道问题出到哪里了 希望哪位大牛能给帮忙解决一下,在此谢谢了!!!
这里不要单引号