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 am new to Webpack Encore and am currently trying to override the style loader settings. During development I use the style loader in devServer and have disabled CSS extraction (Encore.disableCssExtraction()). I'm trying to override the style loader options and couldn't find a way to do so in Webpack Encore. So I now iterate the webpackConfig.module.rules to look for the settings there, which I find a bit ugly. Besides the function configureCssLoader() is there also a function configureStyleLoader() or a more elegant way to override the settings of the StyleLoader?
My code looks like this:
`
if (Encore.isDevServer()) {
Encore.disableCssExtraction();
for (rule of webpackConfig.module.rules) {
if (rule.test.toString().match(/s\[ac\]ss/)) {
if (rule.oneOf) {
for (let set of rule.oneOf) {
set.use[0] = {
loader: 'style-loader',
options: {
...
}
};
}
}
}
}
`
The text was updated successfully, but these errors were encountered:
Hello,
i am new to Webpack Encore and am currently trying to override the style loader settings. During development I use the style loader in devServer and have disabled CSS extraction (Encore.disableCssExtraction()). I'm trying to override the style loader options and couldn't find a way to do so in Webpack Encore. So I now iterate the webpackConfig.module.rules to look for the settings there, which I find a bit ugly. Besides the function configureCssLoader() is there also a function configureStyleLoader() or a more elegant way to override the settings of the StyleLoader?
My code looks like this:
`
if (Encore.isDevServer()) {
`
The text was updated successfully, but these errors were encountered: