fix(css modules): apply preprocessor to composed file if needed (fix #10340)#12076
fix(css modules): apply preprocessor to composed file if needed (fix #10340)#12076Thiry1 wants to merge 3 commits intovitejs:mainfrom
Conversation
f9a9f9d to
3497e60
Compare
|
|
||
| if (isModule) { | ||
| const FileSystemLoader = // @ts-expect-error TODO: needs types | ||
| (await import('postcss-modules/build/FileSystemLoader')).default |
There was a problem hiding this comment.
| async fetch( | ||
| _newPath: string, | ||
| relativeTo: string, | ||
| _trace: string, | ||
| ): Promise<any> { |
There was a problem hiding this comment.
base logic is copied from https://github.com/madyankin/postcss-modules/blob/325f0b33f1b746eae7aa827504a5efd0949022ef/src/FileSystemLoader.js#L68
I added preprocessing between L947 and L970
https://github.com/vitejs/vite/pull/12076/files#diff-2cfbd4f4d8c32727cd8e1a561cffbde0b384a3ce0789340440e144f9d64c10f6R947-R970
|
I built this branch and installed it into my project. Importing values via Using More sophisticated cases which don't work (idk whether they should):
._mix_css_1n1sl_5 {
@mixin test: ;
}
|
|
Thanks for the PR. We discussed about this PR in the last meeting. We think we can have this feature. The remaining things that this PR needs is:
|
|
@Sec32fun32 we'll need to ban you from the org if you continue sending these approvals, they are generating notifications for everyone in watching the repository. |
Description
apply preprocessor to composed file if needed.
fixes: #10340
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).