Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support css module :export #6223

Merged
merged 1 commit into from
Apr 15, 2024
Merged

feat: support css module :export #6223

merged 1 commit into from
Apr 15, 2024

Conversation

JSerFeng
Copy link
Contributor

@JSerFeng JSerFeng commented Apr 12, 2024

Summary

support :export in css module

close #5454

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Apr 12, 2024
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Apr 12, 2024
Copy link

netlify bot commented Apr 12, 2024

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit b0566d6
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/661942f254f3f300089f3546

@JSerFeng
Copy link
Contributor Author

!canary

@JSerFeng JSerFeng force-pushed the feat/css-module-export branch from 32094b3 to 74f0417 Compare April 12, 2024 14:16
@JSerFeng JSerFeng force-pushed the feat/css-module-export branch from 74f0417 to b0566d6 Compare April 12, 2024 14:19
Copy link
Contributor

0.6.1-canary-b0566d6-20240412151129

@JSerFeng JSerFeng enabled auto-merge (squash) April 15, 2024 03:09
@JSerFeng JSerFeng merged commit a9a9d63 into main Apr 15, 2024
28 checks passed
@JSerFeng JSerFeng deleted the feat/css-module-export branch April 15, 2024 05:28
@xc2
Copy link
Collaborator

xc2 commented Apr 15, 2024

thanks @JSerFeng !

it works fine with style-loader and CssExtractRspackPlugin.

however when i extract css with experiments.css, the css output becomes wired.

Source

html {
  --foo-color: #0f0;
}

:export {
  content: "`foo`";
  color: var(--foo-color);
}

Output

html {
  --foo-color: #0f0;
}
:e

Reproduce:

https://github.com/xc2/rspack-repro-css-modules-var-export/tree/recheck

git clone https://github.com/xc2/rspack-repro-css-modules-var-export
git checkout recheck
pnpm i
pnpm build:exp-css
# then check files in dist-rspack-exp-css

@JSerFeng
Copy link
Contributor Author

however when i extract css with experiments.css, the css output becomes wired.

Thank you, I'll fix it soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CSS Modules] export css modules varibles and sass :export variables for css/module type
3 participants