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

[Bug]: hot update failed when with ModuleFederationPlugin #8190

Open
jongwong opened this issue Oct 22, 2024 · 0 comments
Open

[Bug]: hot update failed when with ModuleFederationPlugin #8190

jongwong opened this issue Oct 22, 2024 · 0 comments
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@jongwong
Copy link

System Info

System:
OS: macOS 12.4
CPU: (8) arm64 Apple M1
Memory: 119.28 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
npm: 8.19.0 - ~/.nvm/versions/node/v16.19.0/bin/npm
pnpm: 7.20.0 - ~/.nvm/versions/node/v16.19.0/bin/pnpm
npmPackages:
@rspack/cli: ^1.0.10 => 1.0.10
@rspack/core: ^1.0.10 => 1.0.10
@rspack/dev-middleware: ^0.2.12 => 0.2.12
@rspack/plugin-react-refresh: 1.0.0 => 1.0.0

Details

hot update failed when with ModuleFederationPlugin ,but without ModuleFederationPlugin is ok,
Image

plugins: [
		new rspack.HtmlRspackPlugin({
			template: formatPathname('index.html'),
		}),
		new ProvidePlugin({
			process: [require.resolve('process/browser')],
			Buffer: ['buffer', 'Buffer'],
		}),
		new ModuleFederationPlugin({
			name: 'clientApp',
			remotes: {
				// Define remote application and its URL
				remoteApp: 'adminApp@http://localhost:3000/remoteEntry.js',
			},
			shared: {
				react: { singleton: true, eager: true, requiredVersion: false },
				'react-dom': { singleton: true, eager: true, requiredVersion: false },
			},
		}),
		new RefreshPlugin(),
	].filter(Boolean),

Reproduce link

No response

Reproduce Steps

plugins: [
		new rspack.HtmlRspackPlugin({
			template: formatPathname('index.html'),
		}),
		new ProvidePlugin({
			process: [require.resolve('process/browser')],
			Buffer: ['buffer', 'Buffer'],
		}),
		new ModuleFederationPlugin({
			name: 'clientApp',
			remotes: {
				// Define remote application and its URL
				remoteApp: 'adminApp@http://localhost:3000/remoteEntry.js',
			},
			shared: {
				react: { singleton: true, eager: true, requiredVersion: false },
				'react-dom': { singleton: true, eager: true, requiredVersion: false },
			},
		}),
		new RefreshPlugin(),
	].filter(Boolean),
@jongwong jongwong added bug Something isn't working pending triage The issue/PR is currently untouched. labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

1 participant