module-federation / module-federation-examples

Implementation examples of module federation , by the creators of module federation
https://module-federation.io/
MIT License
5.4k stars 1.7k forks source link

css-Isolation not working in rspack example #3861

Open varunraval9 opened 1 month ago

varunraval9 commented 1 month ago

I have checked css-isolation example where i run app2 (isolated app) in webpack it works as it should, but when i run it using rspack serve it does not.

i check webpack.config.js

there is css loaders are applied as below

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

but there is no configuration added in rspack.config.js

i have tried same configuration in rspack , but no css applied. it seems to me that rspack does not support options.insert.

ScriptedAlchemy commented 1 month ago

Consider filing an issue on rspack if you think there's a problem with css loader.

DanielSegal1 commented 1 month ago

Consider filing an issue on rspack if you think there's a problem with css loader.

there is no problem with rspack. this example utilizes custom css loader which is referenced only in the webpack config and not in the rspack config, which makes the example irrelevant

ScriptedAlchemy commented 1 week ago

okay ill adjust