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
allow to generate only exports for css in node #15200
Conversation
For maintainers only:
|
b8e843c
to
52e5257
Compare
add more options to the DeterministicModuleIdsPlugin to allow to opt-in into a fixed mode optimize module iterations for module id assignment
00934dd
to
318f16e
Compare
|
||
const plugin = "SyncModuleIdsPlugin"; | ||
|
||
class SyncModuleIdsPlugin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this should allowing to kind of map module name to id ? e.g.
{
"C:\\Users\\a\\repo\\a.css|classname_aa": "1",
"C:\\Users\\a\\repo\\b.css|classname_aa": "2",
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Here you need to use it to sync the modules ids between Client and Server compiler so CSS Modules generate the same class names in both.
CSS Module class names are based on module ids in the new implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example of the file:
{"./style.module.css":1876,"./style2.module.css":1054}
318f16e
to
8828dfa
Compare
add more options to the DeterministicModuleIdsPlugin to allow to opt-in into a fixed mode
optimize module iterations for module id assignment
What kind of change does this PR introduce?
feature
Did you add tests for your changes?
yes
Does this PR introduce a breaking change?
no
What needs to be documented once your changes are merged?
nothing