问题描述
postcss-loader autoprefixer 打包后生成的css前缀不全,只有-ms-.
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)
//webpack.base.config.js
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
less: ExtractTextPlugin.extract({
use: [ 'css-loader?minimize', 'postcss-loader', 'less-loader' ],
fallback: 'vue-style-loader'
}),
sass: ExtractTextPlugin.extract({
use: [ 'css-loader?minimize', 'postcss-loader', 'sass-loader?indentedSyntax' ],
fallback: 'vue-style-loader'
}),
scss: ExtractTextPlugin.extract({
use: [ 'css-loader?minimize', 'postcss-loader', 'sass-loader' ],
fallback: 'vue-style-loader'
}),
css: ExtractTextPlugin.extract({
use: [ 'css-loader', 'postcss-loader', 'less-loader' ],
fallback: 'vue-style-loader'
})
},
}
},
{
test: /iview\/.*?js$/,
loader: 'babel-loader'
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
use: [ 'css-loader?minimize', 'postcss-loader' ],
fallback: 'style-loader'
})
},
{
test: /\.less/,
use: ExtractTextPlugin.extract({
use: [ 'postcss-loader', 'less-loader' ],
fallback: 'style-loader'
})
},
{
test: /\.(sass|scss)/,
use: ExtractTextPlugin.extract({
use: [ 'postcss-loader', 'sass-loader' ],
fallback: 'style-loader'
})
},
{
test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/,
loader: 'url-loader?limit=1024'
},
{
test: /\.(html|tpl)$/,
loader: 'html-loader'
}
]
//postcss.config.js
let autoprefixer = require('autoprefixer');
module.exports = {
plugins: [
autoprefixer({
browsers: [
'> 0.01%'
]
})
]
};
你期待的结果是什么?实际看到的错误信息又是什么?
生成其他前缀css代码
https://segmentfault.com/a/11...