vue-loader config
you should use $processStyle in vue-loader's postTransformNode config.
Otherwise, the inline style or binding style will not be auto-prefixed.
See a example:
/**
* //////////////////////////////
* webpack 1.x:
* //////////////////////////////
*/
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel-loader'],
exclude: /node_modules/
}, {
test: /\.vue(\?[^?]+)?$/,
loaders: ['vue-loader']
}
]
},
vue: {
/**
* important! should use postTransformNode to add $processStyle for
* inline style prefixing.
*/
compilerModules: [
{
postTransformNode: el => {
el.staticStyle = `$processStyle(${el.staticStyle})`
el.styleBinding = `$processStyle(${el.styleBinding})`
}
}
],
postcss: [require('autoprefixer')()]
}
/**
* //////////////////////////////
* webpack 2.x:
* //////////////////////////////
*/
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
presets: ['es2015']
}
}, {
test: /\.vue(\?[^?]+)?$/,
loader: 'vue-loader',
options: {
/**
* important! should use postTransformNode to add $processStyle for
* inline style prefixing.
*/
compilerModules: [
{
postTransformNode: el => {
el.staticStyle = `$processStyle(${el.staticStyle})`
el.styleBinding = `$processStyle(${el.styleBinding})`
}
}
],
postcss: [require('autoprefixer')()]
}
}
]
}
vue-loader config
you should use $processStyle in vue-loader's postTransformNode config.
Otherwise, the inline style or binding style will not be auto-prefixed.
See a example: