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

add warning when style-loader used together with experiments.css:true #4272

Closed
hardfist opened this issue Sep 30, 2023 · 4 comments
Closed
Labels
good first issue Good for newcomers stale team The issue/pr is created by the member of Rspack.

Comments

@hardfist
Copy link
Contributor

hardfist commented Sep 30, 2023

set expreiments.css = false, style-loader and experiments.css can't be used together, we should add warning about this

{
 experiments: {
   css:false
}
}

Originally posted by @hardfist in #3922 (comment)

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Sep 30, 2023
@OceanPresentChao
Copy link
Contributor

It is complex to detect whether style-loader is set because there are many ways to set use-entry for style-loader. see detail
Do you have any easier way to do it?

Copy link

stale bot commented Dec 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Dec 17, 2023
@MingCheHarden
Copy link

image
style-loader
Currently style-loader^3.3.3 supports - warning when experiments.css is true,
But this._module is undefined in rspack's loaderContext
I looked at the current rspack NormalModule implementation, which is a simplified version and does not have the _createLoaderContext method in webpack.
image
So the question becomes how to align the implementation of LoadContext._module in webpack in rspack, can you give some guidance on how to do that?
I was interested in finishing my good first issue
@hardfist

@chenjiahan
Copy link
Member

LoadContext._module has been supported in #6753

And experiments.css will defaults to false in Rspack v1.0.0 to align with webpack.

Thank you all ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers stale team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

No branches or pull requests

4 participants