zhangHongEn / universal-module-federation-plugin

Versioned remote module manager based on npm and module-federation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

umi3.5 umi4/max didn't worker

WhatIsSpark opened this issue · comments

errors like $ReactRunTime$ has already been declared

commented

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

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

errorInfo:
image

package.json
image

image

image

image

image

it seems like websocket did not connect ~

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~

commented

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?

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 ,

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

commented

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.

commented

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?

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