Skip to content

Commit 6b3b210

Browse files
Revert "chore(enhanced): adjust add federation init process (#2035)" (#2271)
Co-authored-by: ScriptedAlchemy <[email protected]>
1 parent 32eba3c commit 6b3b210

File tree

32 files changed

+423
-638
lines changed

32 files changed

+423
-638
lines changed

.changeset/gentle-timers-admire.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/runtime': patch
3+
---
4+
5+
Add Register plugins api

.changeset/shaggy-turtles-smell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/enhanced': patch
3+
---
4+
5+
revert chunk integration
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import png from '../../public/webpack.png';
22

33
export default function WebpackPng() {
4-
return <img className="remote1-webpack-png" src={png} alt="webpack png" />;
4+
return (
5+
<div>
6+
<img className="remote1-webpack-png" src={png} alt="webpack png" />
7+
</div>
8+
);
59
}

apps/modernjs/modern.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default defineConfig({
2424
appendPlugins([
2525
new AsyncBoundaryPlugin({
2626
excludeChunk: chunk => chunk.name === 'app1',
27+
eager: module => /\.federation/.test(module?.request || ''),
2728
}),
2829
new ModuleFederationPlugin({
2930
name: 'app1',

apps/modernjs/runtimePlugin.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import React from 'react';
2-
console.log(React);
31
console.log('runtime plugins active');
42
export default function () {
53
return {
64
name: 'eager-react-test-plugin',
7-
init(args) {
5+
async init(args) {
86
return args;
97
},
10-
beforeRequest(args) {
8+
async beforeRequest(args) {
9+
// const React = await import('react');
10+
// console.log(React);
1111
return args;
1212
},
1313
resolveShare(args) {

apps/react-ts-host/@mf-types/index.d.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

apps/react-ts-host/@mf-types/react_ts_nested_remote/Module.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

apps/react-ts-host/@mf-types/react_ts_nested_remote/apis.d.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

apps/react-ts-host/@mf-types/react_ts_nested_remote/compiled-types/nx-welcome.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

apps/react-ts-host/@mf-types/react_ts_nested_remote/compiled-types/utils.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)