Skip to content

react-18-ssr; firefox compatibility #3141

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

Closed
wibed opened this issue Aug 29, 2023 · 2 comments
Closed

react-18-ssr; firefox compatibility #3141

wibed opened this issue Aug 29, 2023 · 2 comments

Comments

@wibed
Copy link
Contributor

wibed commented Aug 29, 2023

id like to track compatibility on firefox

tl:dr
on react-18-ssr firefox does timeout until the infamous remote script loading error appears:
(you can stop loading site, to speed it up)

ScriptExternalLoadError: Loading script failed.
(error: http://localhost:3001/client/remoteEntry.js)
while loading "./Content" from 9223
    9223 remoteEntry.js":1

repro

git clone https://github.com/module-federation/module-federation-examples.git
cd module-federation-examples/react-18-ssr
yarn 
yarn start

!important!

running the app's from vscode terminal will not work.
it has to be run from the os terminal

ps.:

  • example on chrome works fine
  • example on safari works fine

related issues:

@wibed
Copy link
Contributor Author

wibed commented Aug 29, 2023

i tried:

  • defining custom splitChunk config as suggested here.
    on webpack.shared.js, within remote1, remote2, shell
  optimization: {
    splitChunks: {
      chunks: 'async',
      minSize: 30000,
      minRemainingSize: 0,
      maxSize: 0,
      minChunks: 1,
      maxAsyncRequests: 6,
      maxInitialRequests: 4,
      automaticNameDelimiter: '~',
      cacheGroups: {
        vendors: {
          test: /[\\/]node_modules[\\/]/,
          priority: -10
        },
        common: {
          name: `chunk-common`,
          minChunks: 3,
          enforce: true,
          priority: -20,
          chunks: 'async',
          reuseExistingChunk: true,
          test(module) {
            if (
              module.type === 'provide-module' ||
              module.type === 'consume-shared-module' ||
              module.type === 'remote-module'
            ) {
              return false;
            }
            return true;
          }
        }
      }
    }
  }
  • alternating the publicPath between 'auto' and static path as in 'http://localhost:3000/client'
    aswell on all the containers

  • disable runtimeChunks on shared.webpack.js

optimization: {
  runtimeChunks: false
}

@wibed
Copy link
Contributor Author

wibed commented Oct 26, 2023

awww yiiis 💯

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

2 participants