Closed pascalduez closed 7 years ago
I've noticed that when you combine this plugin with postcss-custom-properties and add preserve: true
, you get double CSS Custom Properties, but nothing preserved, which triggers the error found here: https://github.com/pascalduez/postcss-apply/blob/master/src/visitor.js#L57
new webpack.LoaderOptionsPlugin({
options: {
postcss: function (webpack) {
return [
cssApply,
customProperties({
variables: colorPalettes, // JS object from file
warnings: false
}),
autoprefixer,
]
}
}
preserve: true
option set in postcss-custom-propertiesnew webpack.LoaderOptionsPlugin({
options: {
postcss: function (webpack) {
return [
cssApply,
customProperties({
variables: colorPalettes,
+ preserve: true,
warnings: false
}),
autoprefixer,
]
}
}
I'll try to add more unit tests with postcss-custom-properties
options.
When reporting, please provides simple cases/samples/tests reproducing the issue. Without any Webpack, Storybook and such. This is not a proper way to report bugs.
Available from version 0.5.0
on.
https://github.com/postcss/postcss-custom-properties#preserve