mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Disabling autoprefixer in css-loader, explicitly using postcss-loader (#9899)
When the UglifyJsPlugin is used for production, it's setting the minimize property for the loaders in the pipeline. This was causing the css-loader to call cssnano which was itself then calling autoprefixer. We were explicitly calling autoprefixer via the postcss-loader for all style loaders that utilized a preprocessor and specifying the list of supported browsers, specifically to set the prefixes for PhantomJS. When the autoprefixer was run as part of the css-loader, the list of browsers wasn't present and this was causing the prefixes that we added to be removed. This removes the implicit use of autoprefixer from the css-loader and instead explicitly uses the postcss-loader for all style loaders, passing in the proper configuration.
This commit is contained in:
parent
e1b79a3ec1
commit
4540e39479
1 changed files with 7 additions and 7 deletions
|
@ -71,18 +71,18 @@ class BaseOptimizer {
|
|||
|
||||
const makeStyleLoader = preprocessor => {
|
||||
let loaders = [
|
||||
loaderWithSourceMaps('css-loader')
|
||||
loaderWithSourceMaps('css-loader?autoprefixer=false'),
|
||||
{
|
||||
name: 'postcss-loader',
|
||||
query: {
|
||||
config: require.resolve('./postcss.config')
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
if (preprocessor) {
|
||||
loaders = [
|
||||
...loaders,
|
||||
{
|
||||
name: 'postcss-loader',
|
||||
query: {
|
||||
config: require.resolve('./postcss.config')
|
||||
}
|
||||
},
|
||||
loaderWithSourceMaps(preprocessor)
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue