Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

umi3.5 umi4/max didn't worker #12

Open
WhatIsSpark opened this issue Dec 20, 2023 · 12 comments
Open

umi3.5 umi4/max didn't worker #12

WhatIsSpark opened this issue Dec 20, 2023 · 12 comments

Comments

@WhatIsSpark
Copy link

errors like $ReactRunTime$ has already been declared

@zhangHongEn
Copy link
Owner

Which plug-in are you using? Please provide a minimal reproducible example.

@WhatIsSpark
Copy link
Author

image

image

image

image

@WhatIsSpark
Copy link
Author

file: .umirc.ts
image
file: webpack.config.ts
image

errorInfo:
image

package.json
image

@WhatIsSpark
Copy link
Author

WhatIsSpark commented Dec 21, 2023

image

image

image

image

it seems like websocket did not connect ~

@WhatIsSpark
Copy link
Author

WhatIsSpark commented Dec 21, 2023

umi4max-tester.zip

  remotes: {
    "mf-app-01": "mfapp01@https://cdn.jsdelivr.net/npm/mf-app-01/dist/remoteEntry.js",
    "app2": "app2@http://localhost:9002/remoteEntry.js",
    "app3": "app3@http://localhost:9003/remoteEntry.js",
    "ArenaNext": "ArenaNext@http://localhost:8000/remoteEntry.js",
  },

that's all~

@zhangHongEn
Copy link
Owner

The umi template requires no additional configuration, and the react-refresh-webpack-plugin is automatically configured.

And I saw the demo you sent me, using @umijs/react-refresh-webpack-plugin instead of @pmmmwh/react-refresh-webpack-plugin has solved the problem?

@WhatIsSpark
Copy link
Author

The umi template requires no additional configuration, and the react-refresh-webpack-plugin is automatically configured.

And I saw the demo you sent me, using @umijs/react-refresh-webpack-plugin instead of @pmmmwh/react-refresh-webpack-plugin has solved the problem?

no , error still ,

@WhatIsSpark
Copy link
Author

image

@WhatIsSpark
Copy link
Author

the remoteEntry code looks like that,my umi demo's code is less than demo app2's code

@zhangHongEn
Copy link
Owner

errors like ReactRunTime has already been declared

The demo you gave me started normally when I started it locally. The problem cannot be reproduced. In addition, this problem should occur whether you use the single-react-refresh-plugin or not. It should not be related to this plug-in.

@zhangHongEn
Copy link
Owner

The error message seems to have nothing to do with the single-react plug-in, and it should be purely an error of the react-refresh plug-in. Can you complete the demo to reproduce the problem so that I can troubleshoot it?

@WhatIsSpark
Copy link
Author

use umi4 to init a project . configer your project with moduleFederation with umi4. then the problem should be there

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants