Skip to content

Fix: css @import - #299

Open
lachlanmcmillan wants to merge 2 commits into
mrmckeb:mainfrom
lachlanmcmillan:fix/css-import
Open

Fix: css @import#299
lachlanmcmillan wants to merge 2 commits into
mrmckeb:mainfrom
lachlanmcmillan:fix/css-import

Conversation

@lachlanmcmillan

Copy link
Copy Markdown

Issue

fixes #275

When one CSS module @imports another (e.g. fileB.module.css imports fileA.module.css), Vite / css-loader exposes classes from both files on the importing module. This plugin does not, so the Typescript lanaguage service shows an error that the classes referenced from fileA.module.css do not exist.

Fix

Updated the PostCSS import pipeline

Test plan

  • New test: fileB.module.css @imports fileA.module.css; expects both class1 and class2 with the default processor
  • Existing suite passes (pnpm test / npm test)

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.

@import is not being supported

1 participant