Skip to content

Conversation

@nicksrandall
Copy link
Contributor

Description

This PR implements CSS Modules support.

Linked Issues

#22

Additional context

This implementation requires users to use the common *.modules.css filename convention to opt into CSS Modules.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@nicksrandall nicksrandall changed the title Implement CSS Modules - Fixes #22 Implement CSS Modules Feb 3, 2025
@sxzz sxzz force-pushed the main branch 2 times, most recently from 1718ff4 to f582721 Compare February 4, 2025 11:13
@sxzz
Copy link
Member

sxzz commented Feb 4, 2025

The unit test cannot pass on my machine. Seems like the snapshot is unstable.

- Expected
+ Received

- "// assets/asset-B29LbBSd
- .zT-8La_button{color:red;bakcground-color:blue}
+ "// assets/asset-mqsHWfap
+ .aQqtGG_button{color:red;bakcground-color:blue}

  // index.js
- const button = "zT-8La_button";
+ const button = "aQqtGG_button";

  const btn = document.createElement('div').classList.add(button);
  document.body.append(btn);
  "

@sxzz sxzz merged commit f5e97ce into unplugin:main Feb 4, 2025
9 checks passed
@sxzz sxzz mentioned this pull request Feb 4, 2025
3 tasks
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.

2 participants