Use smartStrategy to replace loaders with preset (#2084)
Using `merge.smartStrategy` with `'module.loaders' = 'replace'` to load the preset config allows presets to override the the default webpack config. This is necessary for the coming Tailwind preset which requires `resolve-url-loader` and source maps to be disabled.
This commit is contained in:
@@ -214,4 +214,6 @@ if (config.enabled.watcher) {
|
||||
webpackConfig = merge(webpackConfig, require('./webpack.config.watch'));
|
||||
}
|
||||
|
||||
module.exports = merge(webpackConfig, desire(`${__dirname}/webpack.config.preset`));
|
||||
module.exports = merge.smartStrategy({
|
||||
'module.loaders': 'replace',
|
||||
})(webpackConfig, desire(`${__dirname}/webpack.config.preset`));
|
||||
|
||||
Reference in New Issue
Block a user