Fix dev/prod CSS loader inconsistencies causing cascade ordering mismatches#7304
Merged
Conversation
…ules` SCSS handling
n-lark
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
style-loaderusage withMiniCssExtractPlugin.loaderacross all CSS/SCSS rules, ensuring identical CSS cascade and@layerordering between development and production builds[name].js,[name].css,[name][ext]) so developers can still identify assets by name without content hasheswatchOptions.ignoredforfrontend/dist/**andnode_modules/**to prevent recompile cycles fromwriteToDisk: trueNote
Vendor CSS/SCSS (node_modules) keeps style-loader in dev because of a source map problem with MiniCssExtractPlugin. When all CSS goes through MiniCssExtractPlugin, it generates a single combined CSS source map covering every module that contributed to the output. Packages like @vuepic/vue-datepicker ship dist/main.css with a /*# sourceMappingURL=main.css.map */ reference — and that .map file points back to .scss source files that aren't even included in the published package. Those phantom paths end up in the combined source map as webpack:// URLs that browser DevTools can't resolve, producing errors on every page load and whenever a developer inspects styles.
Using style-loader for vendor CSS in dev keeps it out of the extracted CSS file entirely — the styles are injected as <style> tags via JS, so they never pollute the MiniCssExtractPlugin source map.
Related Issue(s)
closes #7303
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel