- Notifications
You must be signed in to change notification settings - Fork 380
Open
Description
Issue
Currently in config/webpack/commonWebpackConfig.js:49-61
, we directly mutate nested loader options:
if (cssLoader?.options?.modules) { cssLoader.options.modules.namedExport = false; cssLoader.options.modules.exportLocalsConvention = 'camelCase'; }
This risks affecting shared objects from Shakapacker's defaults.
Solution
Use object spread for immutability (already done correctly in serverWebpackConfig.js):
if (cssLoader?.options?.modules) { cssLoader.options.modules = { ...cssLoader.options.modules, namedExport: false, exportLocalsConvention: 'camelCase', }; }
Related
Similar pattern needed in Sass loader configuration (lines 80-96).
Metadata
Metadata
Assignees
Labels
No labels