Closed igor-ribeiro closed 6 years ago
webpack config:
{ loader: 'postcss-loader', options: { parser: 'postcss-scss', plugins: [ require('postcss-cssnext')({ features: { customProperties: false, }, }), require('postcss-css-variables')({ variables: { '--font': 'Arial', }, }), ], },
CSS file:
body { color: var(--color); }
Error:
Module build failed: TypeError: resultantValue.replace is not a function
Even with the preserve options it happens.
preserve
Is it a bug or it's the expected behavior?
If I don't provide the variables option it outputs color: undefined.
variables
color: undefined
Never mind, my fault... One of the values was a number. It works as expected.
webpack config:
CSS file:
Error:
Even with the
preserve
options it happens.Is it a bug or it's the expected behavior?