Skip to content

Commit 92f4411

Browse files
fix(manifest-webpack-host): share only react and react-dom (no subpaths)
Avoids jsx-dev-runtime interop warnings and keeps React versions consistent in manifest e2e.
1 parent 09a8c87 commit 92f4411

File tree

4 files changed

+84
-24
lines changed

4 files changed

+84
-24
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
2+
NX Running target build for project manifest-webpack-host and 17 tasks it depends on:
3+
4+
5+
6+
> nx run sdk:build [local cache]
7+
8+
9+
> nx run error-codes:build [local cache]
10+
11+
12+
> nx run third-party-dts-extractor:build [local cache]
13+
14+
15+
> nx run managers:build [local cache]
16+
17+
18+
> nx run bridge-react-webpack-plugin:build [local cache]
19+
20+
21+
> nx run runtime-core:build [local cache]
22+
23+
24+
> nx run runtime:build [local cache]
25+
26+
27+
> nx run typescript:build [local cache]
28+
29+
30+
> nx run dts-plugin:build [local cache]
31+
32+
33+
> nx run webpack-bundler-runtime:build [local cache]
34+
35+
36+
> nx run data-prefetch:build [local cache]
37+
38+
39+
> nx run runtime-tools:build [local cache]
40+
41+
42+
> nx run manifest:build [local cache]
43+
44+
45+
> nx run cli:build [local cache]
46+
47+
48+
> nx run inject-external-runtime-core-plugin:build [local cache]
49+
50+
51+
> nx run rspack:build [local cache]
52+
53+
54+
> nx run enhanced:build [local cache]
55+
56+
57+
> nx run manifest-webpack-host:build:development
58+
59+
Entrypoint main [big] 1.08 MiB (14.2 KiB) = runtime.js 363 KiB main.css 43 bytes main.js 745 KiB 2 auxiliary assets
60+
chunk (runtime: runtime) main.css, main.js (main) 668 KiB (javascript) 13.6 KiB (asset) 168 bytes (consume-shared) 42 bytes (css/mini-extract) 306 bytes (share-init) 12 bytes (remote) [initial] [rendered]
61+
chunk (runtime: runtime) node_modules_pnpm_react-dom_18_3_1_react_18_3_1_node_modules_react-dom_client_js.js 619 bytes [rendered]
62+
chunk (runtime: runtime) node_modules_pnpm_react-dom_18_3_1_react_18_3_1_node_modules_react-dom_index_js.js 134 KiB [rendered]
63+
chunk (runtime: runtime) node_modules_pnpm_react_18_3_1_node_modules_react_index_js.js 6.95 KiB [rendered]
64+
chunk (runtime: runtime) node_modules_pnpm_react_18_3_1_node_modules_react_jsx-runtime_js.js 1.05 KiB [rendered]
65+
chunk (runtime: runtime) runtime.js (runtime) 324 KiB (javascript) 22.6 KiB (runtime) [entry] [rendered]
66+
chunk (runtime: runtime) src_Preload_tsx.js 4.31 KiB [rendered]
67+
chunk (runtime: runtime) 6 bytes (remote) 6 bytes (share-init)
68+
chunk (runtime: runtime) 6 bytes (remote) 6 bytes (share-init)
69+
chunk (runtime: runtime) 6 bytes (remote) 6 bytes (share-init)
70+
chunk (runtime: runtime) 6 bytes (remote) 6 bytes (share-init)
71+
WARNING in ./src/components/ButtonOldAnt.tsx 8:36-43
72+
Should not import the named export 'version' (imported as 'version') from default-exporting module (only default export is available soon)
73+
webpack compiled with 1 warning (46b9ddd27509f969)
74+
75+
76+
77+
NX Successfully ran target build for project manifest-webpack-host and 17 tasks it depends on
78+
79+
Nx read the output from the cache instead of running the command for 17 out of 18 tasks.
80+
81+
View logs and investigate cache misses at https://cloud.nx.app/runs/NVudwwJKgq
82+

apps/manifest-demo/3009-webpack-provider/webpack.config.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,7 @@ module.exports = composePlugins(
4949
shared: {
5050
lodash: {},
5151
antd: {},
52-
'react/': {
53-
singleton: true,
54-
requiredVersion: '^18.3.1',
55-
},
52+
// Share top-level React packages only to avoid subpath interop issues
5653
react: {
5754
singleton: true,
5855
requiredVersion: '^18.3.1',
@@ -61,10 +58,6 @@ module.exports = composePlugins(
6158
singleton: true,
6259
requiredVersion: '^18.3.1',
6360
},
64-
'react-dom/': {
65-
singleton: true,
66-
requiredVersion: '^18.3.1',
67-
},
6861
},
6962
experiments: {
7063
externalRuntime: true,

apps/manifest-demo/3010-rspack-provider/rspack.config.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ module.exports = composePlugins(
9696
shared: {
9797
lodash: {},
9898
antd: {},
99-
// 'react/': {
100-
// singleton: true,
101-
// requiredVersion: '^18.3.1',
102-
// },
10399
react: {
104100
singleton: true,
105101
requiredVersion: '^18.3.1',
@@ -108,10 +104,6 @@ module.exports = composePlugins(
108104
singleton: true,
109105
requiredVersion: '^18.3.1',
110106
},
111-
'react-dom/': {
112-
singleton: true,
113-
requiredVersion: '^18.3.1',
114-
},
115107
},
116108
dataPrefetch: true,
117109
experiments: {

apps/manifest-demo/webpack-host/webpack.config.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ module.exports = composePlugins(withNx(), withReact(), (config, context) => {
3939
shared: {
4040
lodash: {},
4141
antd: {},
42-
'react/': {
43-
singleton: true,
44-
requiredVersion: '^18.3.1',
45-
},
42+
// Share top-level React packages only to avoid subpath interop issues
4643
react: {
4744
singleton: true,
4845
requiredVersion: '^18.3.1',
@@ -51,10 +48,6 @@ module.exports = composePlugins(withNx(), withReact(), (config, context) => {
5148
singleton: true,
5249
requiredVersion: '^18.3.1',
5350
},
54-
'react-dom/': {
55-
singleton: true,
56-
requiredVersion: '^18.3.1',
57-
},
5851
},
5952
dataPrefetch: true,
6053
runtimePlugins: [path.join(__dirname, './runtimePlugin.ts')],

0 commit comments

Comments
 (0)