-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It remove browser prefix by default, but I want to save prefix when generate css files. #51
Comments
So what can I do ? |
me too. |
By default the CSS manipulation that this plugin does is delegated to cssnano. You can control the cssnano config in the This is a cssnano related issue. |
I finded the solution, we can pass by some option to cssnano, please view following example: new OptimizeCssAssetsPlugin({
assetNameRegExp: /\.css$/g,
cssProcessorOptions: {
safe: true,
autoprefixer: { disable: true },
mergeLonghand: false,
discardComments: {
removeAll: true
}
},
canPrint: true
}); the option of |
I able to make it work, sharing here just in case anyone stumble upon same issue. It seems like if you set Example of {
"browserslist": [
">1%",
"last 4 versions",
"not ie < 9"
]
} |
While ansenhuang's answer is correct, if you want to only disable Autoprefixer's remove outdated prefixes function and keep everything else, replace |
No description provided.
The text was updated successfully, but these errors were encountered: