Change from Webpack to Turbopack and CSS does not load correcly
Unanswered
Cape lion posted this in #help-forum
Cape lionOP
This is the rule i use in webpack to correct load the modual.css files and add the correct classes to elements.
webpack: (config) => {
// camelCase style names from css modules
config.module.rules
.find(({ oneOf }) => !!oneOf)
.oneOf.filter(({ use }) => JSON.stringify(use)?.includes('css-loader'))
.reduce((acc, { use }) => acc.concat(use), [])
.forEach(({ options }) => {
if (options.modules) {
options.modules.exportLocalsConvention = 'camelCase'
}
})
return config
},
Now when i swapped to Turbopack, my classes in *.module.scss files does not load correcly. What is the fix for this?
webpack: (config) => {
// camelCase style names from css modules
config.module.rules
.find(({ oneOf }) => !!oneOf)
.oneOf.filter(({ use }) => JSON.stringify(use)?.includes('css-loader'))
.reduce((acc, { use }) => acc.concat(use), [])
.forEach(({ options }) => {
if (options.modules) {
options.modules.exportLocalsConvention = 'camelCase'
}
})
return config
},
Now when i swapped to Turbopack, my classes in *.module.scss files does not load correcly. What is the fix for this?