fix: add correct type declaration for style.css export#2897
Merged
Conversation
The ./style.css export condition pointed its types at style.module.css.d.ts, which declares a CSS modules object. Plain style.css is not a CSS module — add a dedicated style.css.d.ts and update package.json to reference it.
gpbl
approved these changes
Feb 9, 2026
Owner
|
Good find @NotNestor - thanks for your contribution. |
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.
What's Changed
The ./style.css export condition pointed its types at style.module.css.d.ts, which declares a CSS modules object. Plain style.css is not a CSS module — add a dedicated style.css.d.ts and update package.json to reference it.
Type of Change
Additional Notes
The ./style.css export in package.json points its types condition at ./src/style.module.css.d.ts, which types the default export as a CSS module object. This is incorrect for plain ./style.css — bundlers return a CSS string, not an object. This causes a type error with moduleResolution: "bundler" since the exports map takes precedence over ambient declare module overrides.
This PR adds a src/style.css.d.ts that correctly types the export as string, and updates the exports map to reference it.