html规则写在loaders中编译有问题的同学,可以试试下面的写法。
module: {
rules: [{
test: /\.html$/,
use: [ {
loader: 'html-loader'
}],
}]
}
module: {
rules: [{
test: /\.html$/,
use: [ {
loader: 'html-loader'
}],
}]
}
2017-05-18
设置importLoader=1,在webpack 2.0上用不了,查了postcss-loader的文档时,官网上提供了postcss-import,需要先install;然后代码:
module:{ rules:[ {test: /\.css$/,
loader:'css-loader'}, { loader:"postcss-loader", options:{ plugins:[ require('postcss-import')(),require('autoprefixer')() ] } }] }] },
module:{ rules:[ {test: /\.css$/,
loader:'css-loader'}, { loader:"postcss-loader", options:{ plugins:[ require('postcss-import')(),require('autoprefixer')() ] } }] }] },
2017-05-18