先下载img-loader,然后配置:
{
test: /\.(png|jpg|gif|svg)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 10000,
name: 'assets/[name]-[hash:5].[ext]'
}
},
{
loader: 'img-loader'
}
]
}
{
test: /\.(png|jpg|gif|svg)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 10000,
name: 'assets/[name]-[hash:5].[ext]'
}
},
{
loader: 'img-loader'
}
]
}
2017-04-10
npm install babel-preset-env -g
可以解决query:{
presets: ['env']
}
的问题
可以解决query:{
presets: ['env']
}
的问题
2017-04-10
安装html-webpack-plugin配置完配置文件之后 运行打包
Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
2017-04-09
Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
2017-04-09