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

fix(css-module): dynamic import css module #891

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

stormslowly
Copy link
Member

@stormslowly stormslowly commented Jan 23, 2024

close #888

rules

参考 @umi/bundler-webpack 的行为

  1. autoCSSModules 只针对 import styles from "*.css" 生效
  2. autoCSSModules 开启的情况下,import("xxx.css") ,不按 css module 处理
  3. autoCSSModules 开启的情况下,require("xxx.css") ,不按 css module 处理
  4. import("xxx.module.css") 始终是按照了 css module 来处理
  5. require("xxx.module.css") 始终是按照了 css module 来处理
  6. import("aliased_to_xxx.module.css") 也是按 css module 处理 later in [bug] css 的 import 语句未删除 #866
  7. require("aliased_to_xxx.module.css") 也是按 css module 处理 later in [bug] css 的 import 语句未删除 #866

@stormslowly stormslowly changed the title fix(css-module): dynamic import css module wip: fix(css-module): dynamic import css module Jan 23, 2024
@stormslowly stormslowly changed the title wip: fix(css-module): dynamic import css module fix(css-module): dynamic import css module Jan 23, 2024
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.

[bug] import("foo.module.css") return wrong promise
1 participant