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

CSS Modules does not work. #298 #380

Open
wants to merge 1 commit into
base: issue-77
Choose a base branch
from

Conversation

skjulestad
Copy link

Add esModule: false to webpack.config.react4xp.js so css modules can be used.

@skjulestad skjulestad added the bug Something isn't working label Jan 29, 2025
@skjulestad skjulestad self-assigned this Jan 29, 2025
@skjulestad skjulestad linked an issue Jan 29, 2025 that may be closed by this pull request
@skjulestad skjulestad requested a review from sigdestad January 30, 2025 07:56
@sigdestad
Copy link
Member

What does deactivating esModule actually mean? Will something else break?

@skjulestad
Copy link
Author

https://rspack.dev/config/module#moduleparsercssmodule
esModule is set to true by default, if not set to false it seems to stop commonJS
"For example, a common use case, when using the CommonJS output from a third-party component library, it is sometimes necessary to add this configuration to ensure correct ESM-CJS interop, to obtain the correct exports (this can be used in conjunction with Rule.test and other matching conditions to add it only for that particular component library)."
This is as good of an answer as I am able to produce at the moment.

@sigdestad
Copy link
Member

Hi. I guess my question is - will something else break? I am not the right person to verify code at this level. Maybe assign this PR to someone else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSS Modules does not work.
2 participants