老师,这里报错了

webpack.config.js的代码
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const resolve = dir=>path.resolve(__dirname,dir);
module.exports = {
mode:'development',
entry:{
index:'./src/index.js',
list:'./src/list.js'
},
output:{
path:resolve('dist'),
filename:'js/[name].js'
},
devtool:'cheap-module-eval-source-map',
module:{
rules:[
{
test:/\.art$/,
loader:'art-template-loader'
}
]
},
plugins:[
new HtmlWebpackPlugin({
filename:'index.html',
template:'./src/index.art',
chunks:['index']
}),
new HtmlWebpackPlugin({
filename:'list.html',
template:'./src/list.art',
chunks:['list']
})
]
}package.json的
{
"name": "art-template-webpack",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack"
},
"author": "",
"license": "ISC",
"devDependencies": {
"art-template-loader": "^1.4.3",
"html-webpack-plugin": "^4.3.0",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12"
},
"dependencies": {
"art-template": "^4.13.2"
}
}
14
收起
正在回答 回答被采纳积分+1
1回答
相似问题
登录后可查看更多问答,登录/注册




恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星