You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a function that dynamically sets whether sourceMaps should be included (amongst other options):
getExtractCSSLoaders(extractCSS,sourceMap=false){return(function*loadCss(){for(constloaderofcss.loaders){// Iterate over CSS/SASS/LESS and yield local and global mod configsfor(constmodofcss.getModuleRegExp(loader.ext)){yield{test: newRegExp(mod[0]),loader: extractCSS.extract({use: [{loader: 'css-loader',query: Object.assign({},css.loaderDefaults,{
sourceMap,},mod[1]),},// 'postcss-loader',{loader: 'postcss-loader',options: {sourceMap: false,},},
...loader.use,],fallback: 'style-loader',}),};}}}());},
Explicitly setting sourceMap: false seems to kill/bypass postcss:
// Explicitly setting `sourceMap` to the default `false` kills it...{loader: 'postcss-loader',options: {sourceMap: false,},},
I have a function that dynamically sets whether sourceMaps should be included (amongst other options):
Explicitly setting
sourceMap: false
seems to kill/bypass postcss:Setting it to true works fine:
And ignoring the option is also fine:
A temporary workaround is to do a slightly uglier:
The text was updated successfully, but these errors were encountered: