新建postcss.config.js:
module.exports = {
plugins: {
'autoprefixer': {},
}
}
在webpack.config.js :
{
test:/\.css$/,
loader: [
'style-loader',
{ loader: 'css-loader', options: { importLoaders: 1 } },
'postcss-loader'
]
}
已经测试,可用
module.exports = {
plugins: {
'autoprefixer': {},
}
}
在webpack.config.js :
{
test:/\.css$/,
loader: [
'style-loader',
{ loader: 'css-loader', options: { importLoaders: 1 } },
'postcss-loader'
]
}
已经测试,可用
2017-06-13
@Ron0115
第一个版本原因解决了。
但是当.flex-box{
display:flex;
} 提取出来的的时候,没有自动添加前缀
第一个版本原因解决了。
但是当.flex-box{
display:flex;
} 提取出来的的时候,没有自动添加前缀
2017-06-13
最新回答 / xiongwn
入口js(main.js)里的引用是否正确检查一下webpack命令默认值(webpack.config.js)文件在运行前是否保存根据webpack版本不同打包文件也会有差异,检查一下能否正确运行出结果,如果正确就没必要管里面的具体内容了
2017-06-13
现在可以用html-webpack-inline-source-plugin插件了,很方便。
只需要加一句:inlineSource: '.(js|css)$' 匹配用的是正则。
具体的可以去github看:https://github.com/DustinJackson/html-webpack-inline-source-plugin
只需要加一句:inlineSource: '.(js|css)$' 匹配用的是正则。
具体的可以去github看:https://github.com/DustinJackson/html-webpack-inline-source-plugin
2017-06-11