Skip to content

chore: add plugin to rename .module.css assets to .css in the bui…#374

Merged
sofa-tata merged 1 commit intomainfrom
sofi/fix-css-in-bundle
Mar 31, 2026
Merged

chore: add plugin to rename .module.css assets to .css in the bui…#374
sofa-tata merged 1 commit intomainfrom
sofi/fix-css-in-bundle

Conversation

@sofa-tata
Copy link
Copy Markdown
Contributor

…ld output

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 31, 2026

PR Summary

Medium Risk
Changes the library build output by renaming emitted CSS assets and rewriting chunk references, which could break consumers if filenames collide or expectations differ. Scope is limited to Vite/Rollup bundling behavior.

Overview
Updates vite.config.ts to include a new post-build plugin (stripCssModuleExtension) that renames emitted .module.css assets to .css and rewrites any chunk code references to match.

This aims to prevent downstream bundlers from dropping or re-processing CSS Modules when consuming the built library (class names are already hashed).

Written by Cursor Bugbot for commit 64dad9f. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@sofa-tata sofa-tata merged commit 6c04772 into main Mar 31, 2026
5 checks passed
@sofa-tata sofa-tata deleted the sofi/fix-css-in-bundle branch March 31, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant