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-isolation example with rspack doesn't isolate css #4248

Closed
MichaelJHaywood opened this issue Jul 29, 2024 · 1 comment
Closed

css-isolation example with rspack doesn't isolate css #4248

MichaelJHaywood opened this issue Jul 29, 2024 · 1 comment

Comments

@MichaelJHaywood
Copy link

MichaelJHaywood commented Jul 29, 2024

When running the legacy:start script and clicking the button to change everything to yellow, it only changes the app2 background to yellow.
When using start it changes the whole background to yellow.

I found this as I was looking for an example for how to use rspack with a custom style loader as I can't get it to work after changing from webpack. It looks like your example doesn't have a section in the rspack file similar to this:

      {
        test: /\.css$/,
        use: [
          {
            loader: 'style-loader',
            options: {
              insert: require.resolve('./styleLoader.js'),
            },
          },
          'css-loader',
        ],
      },

I'm unable to get this working with rspack currently.

@MichaelJHaywood
Copy link
Author

Duplicate of #3861

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

No branches or pull requests

1 participant