在 webpack 3.10中filename好像都是 使用 绝对路径去写的 哦 这点好像没有像老师 说的 path 相对路径~~
2017-12-28
好像在webpack 3.10中 htmlWebpackPlugin() 插件中生成的index.html就已经和初始化生成的html关联上了~~啊啊哈哈
2017-12-28
我的webpack3.10.0,include和exclude不能加引号,一加就报错
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader",
include:/src/,
query:{
presets:['latest']
}
}]
},
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader",
include:/src/,
query:{
presets:['latest']
}
}]
},
2017-12-28
在webpack3.10版本中改成这样写:
test:/\.(png|jpg|jpeg|gif|svg)$/i,
use:[
{
loader:'file-loader',
options:{
name:'src/assets/[name]-[hash:5].[ext]'
}
}
],
test:/\.(png|jpg|jpeg|gif|svg)$/i,
use:[
{
loader:'file-loader',
options:{
name:'src/assets/[name]-[hash:5].[ext]'
}
}
],
2017-12-27