@bleedingdev/modern-js-app-tools-extensions 3.9.0-ultramodern.2 → 3.9.0-ultramodern.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/backend-federation-build/codegen.js +267 -0
- package/dist/cjs/backend-federation-build/config.js +239 -0
- package/dist/cjs/backend-federation-build/emit.js +154 -0
- package/dist/cjs/backend-federation-build/index.js +53 -0
- package/dist/cjs/build-config/build-environment.js +129 -0
- package/dist/cjs/build-config/precompress/plugin.js +124 -0
- package/dist/cjs/build-config/precompress/types.js +18 -0
- package/dist/cjs/build-config/public.js +43 -0
- package/dist/cjs/build-config/remote-address.js +58 -0
- package/dist/cjs/cloudflare/artifacts.js +8 -19
- package/dist/cjs/cloudflare/constants.js +1 -1
- package/dist/cjs/cloudflare/delivery-unit.js +23 -42
- package/dist/cjs/cloudflare/index.js +10 -2
- package/dist/cjs/cloudflare/worker-manifest.js +13 -4
- package/dist/cjs/cloudflare/wrangler-config.js +35 -7
- package/dist/cjs/cloudflare-builder.js +252 -75
- package/dist/cjs/cloudflare-output-contract.js +69 -3
- package/dist/cjs/cloudflare-output-verifier/identity.js +29 -27
- package/dist/cjs/cloudflare-output-verifier/index.js +10 -0
- package/dist/cjs/cloudflare-output-verifier/manifest.js +46 -0
- package/dist/cjs/cloudflare-output-verifier/mutation-policy.js +7 -1
- package/dist/cjs/cloudflare-output-verifier/worker-bundles.js +14 -6
- package/dist/cjs/config.js +34 -1
- package/dist/cjs/deploy-output/npmAliases.js +251 -0
- package/dist/cjs/deploy-output/plugin.js +97 -0
- package/dist/cjs/deploy-output/public-assets.js +146 -0
- package/dist/cjs/deploy-output/target.js +104 -0
- package/dist/cjs/deploy-output/trace-files.js +90 -0
- package/dist/cjs/native-type-checker.js +193 -0
- package/dist/cjs/policy-defaults.js +101 -0
- package/dist/cjs/release-envelope/framework-output.js +153 -79
- package/dist/cjs/release-envelope/index.js +10 -4
- package/dist/cjs/release-envelope/plugin.js +18 -13
- package/dist/cjs/release-identity.js +5 -6
- package/dist/cjs/runtime-package-resolution.js +118 -0
- package/dist/cjs/templates/cloudflare-entry.001-bootstrap-security.mjs +0 -3
- package/dist/cjs/templates/cloudflare-entry.002-assets-routes.mjs +1 -1
- package/dist/cjs/templates/cloudflare-entry.004-rendering-css.mjs +5 -1
- package/dist/cjs/templates/cloudflare-entry.005-worker-dispatch.mjs +98 -10
- package/dist/cjs/templates/cloudflare-entry.006-fetch-handler.mjs +9 -2
- package/dist/cjs/templates/cloudflare-worker-route-data.mjs +1069 -0
- package/dist/esm/backend-federation-build/codegen.mjs +216 -0
- package/dist/esm/backend-federation-build/config.mjs +163 -0
- package/dist/esm/backend-federation-build/emit.mjs +103 -0
- package/dist/esm/backend-federation-build/index.mjs +1 -0
- package/dist/esm/build-config/build-environment.mjs +88 -0
- package/dist/esm/build-config/precompress/plugin.mjs +76 -0
- package/dist/esm/build-config/precompress/types.mjs +0 -0
- package/dist/esm/build-config/public.mjs +1 -0
- package/dist/esm/build-config/remote-address.mjs +20 -0
- package/dist/esm/cloudflare/artifacts.mjs +8 -19
- package/dist/esm/cloudflare/constants.mjs +1 -1
- package/dist/esm/cloudflare/delivery-unit.mjs +17 -36
- package/dist/esm/cloudflare/index.mjs +10 -2
- package/dist/esm/cloudflare/worker-manifest.mjs +13 -4
- package/dist/esm/cloudflare/wrangler-config.mjs +35 -7
- package/dist/esm/cloudflare-builder.mjs +246 -75
- package/dist/esm/cloudflare-output-contract.mjs +59 -2
- package/dist/esm/cloudflare-output-verifier/identity.mjs +27 -25
- package/dist/esm/cloudflare-output-verifier/index.mjs +10 -0
- package/dist/esm/cloudflare-output-verifier/manifest.mjs +46 -0
- package/dist/esm/cloudflare-output-verifier/mutation-policy.mjs +7 -1
- package/dist/esm/cloudflare-output-verifier/worker-bundles.mjs +15 -7
- package/dist/esm/config.mjs +3 -0
- package/dist/esm/deploy-output/npmAliases.mjs +199 -0
- package/dist/esm/deploy-output/plugin.mjs +46 -0
- package/dist/esm/deploy-output/public-assets.mjs +82 -0
- package/dist/esm/deploy-output/target.mjs +57 -0
- package/dist/esm/deploy-output/trace-files.mjs +38 -0
- package/dist/esm/native-type-checker.mjs +142 -0
- package/dist/esm/policy-defaults.mjs +45 -0
- package/dist/esm/release-envelope/framework-output.mjs +130 -56
- package/dist/esm/release-envelope/index.mjs +10 -4
- package/dist/esm/release-envelope/plugin.mjs +18 -13
- package/dist/esm/release-identity.mjs +5 -6
- package/dist/esm/runtime-package-resolution.mjs +60 -0
- package/dist/esm/templates/cloudflare-entry.001-bootstrap-security.mjs +0 -3
- package/dist/esm/templates/cloudflare-entry.002-assets-routes.mjs +1 -1
- package/dist/esm/templates/cloudflare-entry.004-rendering-css.mjs +5 -1
- package/dist/esm/templates/cloudflare-entry.005-worker-dispatch.mjs +98 -10
- package/dist/esm/templates/cloudflare-entry.006-fetch-handler.mjs +9 -2
- package/dist/esm/templates/cloudflare-worker-route-data.mjs +1069 -0
- package/dist/esm-node/backend-federation-build/codegen.mjs +217 -0
- package/dist/esm-node/backend-federation-build/config.mjs +164 -0
- package/dist/esm-node/backend-federation-build/emit.mjs +104 -0
- package/dist/esm-node/backend-federation-build/index.mjs +2 -0
- package/dist/esm-node/build-config/build-environment.mjs +89 -0
- package/dist/esm-node/build-config/precompress/plugin.mjs +77 -0
- package/dist/esm-node/build-config/precompress/types.mjs +1 -0
- package/dist/esm-node/build-config/public.mjs +2 -0
- package/dist/esm-node/build-config/remote-address.mjs +21 -0
- package/dist/esm-node/cloudflare/artifacts.mjs +8 -19
- package/dist/esm-node/cloudflare/constants.mjs +1 -1
- package/dist/esm-node/cloudflare/delivery-unit.mjs +17 -36
- package/dist/esm-node/cloudflare/index.mjs +10 -2
- package/dist/esm-node/cloudflare/worker-manifest.mjs +13 -4
- package/dist/esm-node/cloudflare/wrangler-config.mjs +35 -7
- package/dist/esm-node/cloudflare-builder.mjs +246 -75
- package/dist/esm-node/cloudflare-output-contract.mjs +59 -2
- package/dist/esm-node/cloudflare-output-verifier/identity.mjs +27 -25
- package/dist/esm-node/cloudflare-output-verifier/index.mjs +10 -0
- package/dist/esm-node/cloudflare-output-verifier/manifest.mjs +46 -0
- package/dist/esm-node/cloudflare-output-verifier/mutation-policy.mjs +7 -1
- package/dist/esm-node/cloudflare-output-verifier/worker-bundles.mjs +15 -7
- package/dist/esm-node/config.mjs +3 -0
- package/dist/esm-node/deploy-output/npmAliases.mjs +200 -0
- package/dist/esm-node/deploy-output/plugin.mjs +49 -0
- package/dist/esm-node/deploy-output/public-assets.mjs +83 -0
- package/dist/esm-node/deploy-output/target.mjs +58 -0
- package/dist/esm-node/deploy-output/trace-files.mjs +39 -0
- package/dist/esm-node/native-type-checker.mjs +143 -0
- package/dist/esm-node/policy-defaults.mjs +46 -0
- package/dist/esm-node/release-envelope/framework-output.mjs +130 -56
- package/dist/esm-node/release-envelope/index.mjs +10 -4
- package/dist/esm-node/release-envelope/plugin.mjs +18 -13
- package/dist/esm-node/release-identity.mjs +5 -6
- package/dist/esm-node/runtime-package-resolution.mjs +61 -0
- package/dist/esm-node/templates/cloudflare-entry.001-bootstrap-security.mjs +0 -3
- package/dist/esm-node/templates/cloudflare-entry.002-assets-routes.mjs +1 -1
- package/dist/esm-node/templates/cloudflare-entry.004-rendering-css.mjs +5 -1
- package/dist/esm-node/templates/cloudflare-entry.005-worker-dispatch.mjs +98 -10
- package/dist/esm-node/templates/cloudflare-entry.006-fetch-handler.mjs +9 -2
- package/dist/esm-node/templates/cloudflare-worker-route-data.mjs +1069 -0
- package/dist/types/backend-federation-build/codegen.d.ts +116 -0
- package/dist/types/backend-federation-build/config.d.ts +121 -0
- package/dist/types/backend-federation-build/emit.d.ts +21 -0
- package/dist/types/backend-federation-build/index.d.ts +2 -0
- package/dist/types/build-config/build-environment.d.ts +14 -0
- package/dist/types/build-config/precompress/plugin.d.ts +4 -0
- package/dist/types/build-config/precompress/types.d.ts +19 -0
- package/dist/types/build-config/public.d.ts +2 -0
- package/dist/types/build-config/remote-address.d.ts +3 -0
- package/dist/types/cloudflare/artifacts.d.ts +7 -6
- package/dist/types/cloudflare/constants.d.ts +1 -1
- package/dist/types/cloudflare/delivery-unit.d.ts +3 -3
- package/dist/types/cloudflare/worker-manifest.d.ts +2 -2
- package/dist/types/cloudflare/wrangler-config.d.ts +6 -0
- package/dist/types/cloudflare-builder.d.ts +49 -9
- package/dist/types/cloudflare-output-contract.d.ts +4 -1
- package/dist/types/cloudflare-output-verifier/identity.d.ts +1 -1
- package/dist/types/cloudflare-output-verifier/worker-bundles.d.ts +2 -2
- package/dist/types/config.d.ts +29 -1
- package/dist/types/deploy-output/npmAliases.d.ts +14 -0
- package/dist/types/deploy-output/plugin.d.ts +35 -0
- package/dist/types/deploy-output/public-assets.d.ts +51 -0
- package/dist/types/deploy-output/target.d.ts +29 -0
- package/dist/types/deploy-output/trace-files.d.ts +17 -0
- package/dist/types/native-type-checker.d.ts +15 -0
- package/dist/types/policy-defaults.d.ts +46 -0
- package/dist/types/precompress/LICENSE +20 -0
- package/dist/types/precompress/index.d.ts +76 -0
- package/dist/types/release-envelope/framework-output.d.ts +8 -3
- package/dist/types/release-envelope/plugin.d.ts +7 -7
- package/dist/types/runtime-package-resolution.d.ts +28 -0
- package/dist/types/templates/cloudflare-worker-route-data.d.mts +14 -0
- package/package.json +97 -15
- package/src/backend-federation-build/codegen.ts +254 -0
- package/src/backend-federation-build/config.ts +492 -0
- package/src/backend-federation-build/emit.ts +213 -0
- package/src/backend-federation-build/index.ts +2 -0
- package/src/build-config/build-environment.ts +160 -0
- package/src/build-config/precompress/plugin.ts +140 -0
- package/src/build-config/precompress/types.ts +26 -0
- package/src/build-config/public.ts +5 -0
- package/src/build-config/remote-address.ts +33 -0
- package/src/cloudflare/artifacts.ts +22 -43
- package/src/cloudflare/constants.ts +1 -1
- package/src/cloudflare/delivery-unit.ts +42 -53
- package/src/cloudflare/index.ts +24 -11
- package/src/cloudflare/worker-manifest.ts +20 -3
- package/src/cloudflare/wrangler-config.ts +86 -10
- package/src/cloudflare-builder.ts +475 -151
- package/src/cloudflare-output-contract.ts +70 -0
- package/src/cloudflare-output-verifier/identity.ts +5 -1
- package/src/cloudflare-output-verifier/index.ts +20 -0
- package/src/cloudflare-output-verifier/manifest.ts +77 -0
- package/src/cloudflare-output-verifier/mutation-policy.ts +11 -1
- package/src/cloudflare-output-verifier/worker-bundles.ts +32 -14
- package/src/config.ts +34 -6
- package/src/deploy-output/npmAliases.ts +382 -0
- package/src/deploy-output/plugin.ts +86 -0
- package/src/deploy-output/public-assets.ts +224 -0
- package/src/deploy-output/target.ts +106 -0
- package/src/deploy-output/trace-files.ts +67 -0
- package/src/native-type-checker.ts +183 -0
- package/src/policy-defaults.ts +127 -0
- package/src/release-envelope/framework-output.ts +346 -94
- package/src/release-envelope/index.ts +26 -5
- package/src/release-envelope/plugin.ts +43 -40
- package/src/release-identity.ts +13 -2
- package/src/runtime-package-resolution.ts +115 -0
- package/src/templates/cloudflare-entry.001-bootstrap-security.mjs +0 -3
- package/src/templates/cloudflare-entry.002-assets-routes.mjs +1 -1
- package/src/templates/cloudflare-entry.004-rendering-css.mjs +5 -1
- package/src/templates/cloudflare-entry.005-worker-dispatch.mjs +98 -10
- package/src/templates/cloudflare-entry.006-fetch-handler.mjs +9 -2
- package/src/templates/cloudflare-worker-route-data.mjs +1069 -0
- package/dist/cjs/templates/cloudflare-worker-fs-promises.mjs +0 -11
- package/dist/cjs/templates/cloudflare-worker-loadable-server.mjs +0 -281
- package/dist/cjs/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +0 -14
- package/dist/cjs/templates/cloudflare-worker-path.mjs +0 -98
- package/dist/esm/templates/cloudflare-worker-fs-promises.mjs +0 -11
- package/dist/esm/templates/cloudflare-worker-loadable-server.mjs +0 -281
- package/dist/esm/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +0 -14
- package/dist/esm/templates/cloudflare-worker-path.mjs +0 -98
- package/dist/esm-node/templates/cloudflare-worker-fs-promises.mjs +0 -11
- package/dist/esm-node/templates/cloudflare-worker-loadable-server.mjs +0 -281
- package/dist/esm-node/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +0 -14
- package/dist/esm-node/templates/cloudflare-worker-path.mjs +0 -98
- package/dist/types/templates/cloudflare-worker-fs-promises.d.mts +0 -5
- package/dist/types/templates/cloudflare-worker-loadable-server.d.mts +0 -48
- package/dist/types/templates/cloudflare-worker-mf-ssr-runtime-plugin.d.mts +0 -13
- package/dist/types/templates/cloudflare-worker-path.d.mts +0 -21
- package/src/templates/cloudflare-worker-fs-promises.mjs +0 -11
- package/src/templates/cloudflare-worker-loadable-server.mjs +0 -281
- package/src/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +0 -14
- package/src/templates/cloudflare-worker-path.mjs +0 -98
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
import loadableComponent from '@loadable/component';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
const internals =
|
|
5
|
-
loadableComponent?.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED || {};
|
|
6
|
-
const LoadableContext = internals.Context || React.createContext(null);
|
|
7
|
-
const getRequiredChunkKey =
|
|
8
|
-
internals.getRequiredChunkKey ||
|
|
9
|
-
(namespace => `${namespace}__LOADABLE_REQUIRED_CHUNKS__`);
|
|
10
|
-
|
|
11
|
-
const scriptExtensions = new Set(['.js', '.mjs']);
|
|
12
|
-
const styleExtensions = new Set(['.css']);
|
|
13
|
-
|
|
14
|
-
function uniqByUrl(assets) {
|
|
15
|
-
const seen = new Set();
|
|
16
|
-
|
|
17
|
-
return assets.filter(asset => {
|
|
18
|
-
if (seen.has(asset.url)) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
seen.add(asset.url);
|
|
23
|
-
return true;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function extname(filePath) {
|
|
28
|
-
const basename = String(filePath).split('/').pop() || '';
|
|
29
|
-
const index = basename.lastIndexOf('.');
|
|
30
|
-
|
|
31
|
-
return index > 0 ? basename.slice(index) : '';
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function isAutomaticPublicPath(publicPath) {
|
|
35
|
-
return publicPath === 'auto' || publicPath === 'auto/';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function joinUrl(publicPath, filename) {
|
|
39
|
-
const base =
|
|
40
|
-
!publicPath || isAutomaticPublicPath(publicPath) ? '/' : publicPath;
|
|
41
|
-
|
|
42
|
-
return `${base.replace(/\/+$/u, '')}/${String(filename).replace(/^\/+/u, '')}`;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function extraPropsToString(extraProps = {}) {
|
|
46
|
-
return Object.entries(extraProps)
|
|
47
|
-
.filter(([, value]) => value !== undefined && value !== false)
|
|
48
|
-
.map(([key, value]) => (value === true ? ` ${key}` : ` ${key}="${value}"`))
|
|
49
|
-
.join('');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function assetScriptType(filename) {
|
|
53
|
-
const extension = extname(filename);
|
|
54
|
-
|
|
55
|
-
if (scriptExtensions.has(extension)) {
|
|
56
|
-
return 'script';
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (styleExtensions.has(extension)) {
|
|
60
|
-
return 'style';
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function getAssetName(asset) {
|
|
65
|
-
return typeof asset === 'object' && asset?.name ? asset.name : asset;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function getAssetIntegrity(asset) {
|
|
69
|
-
return typeof asset === 'object' && asset?.integrity ? asset.integrity : null;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function getChunkGroupAssets(chunkGroup) {
|
|
73
|
-
const assets = chunkGroup?.assets;
|
|
74
|
-
|
|
75
|
-
if (Array.isArray(assets)) {
|
|
76
|
-
return assets;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (assets && typeof assets === 'object') {
|
|
80
|
-
return [...(assets.js || []), ...(assets.css || [])];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return [];
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function getChunkGroupChildAssets(chunkGroup, type) {
|
|
87
|
-
const childAssets = chunkGroup?.childAssets?.[type];
|
|
88
|
-
|
|
89
|
-
return Array.isArray(childAssets) ? childAssets : [];
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function chunkIncludesJs(chunkInfo) {
|
|
93
|
-
return (chunkInfo?.files || []).some(file =>
|
|
94
|
-
scriptExtensions.has(extname(file)),
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export function ChunkExtractorManager({ extractor, children }) {
|
|
99
|
-
return React.createElement(
|
|
100
|
-
LoadableContext.Provider,
|
|
101
|
-
{ value: extractor },
|
|
102
|
-
children,
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export class ChunkExtractor {
|
|
107
|
-
constructor({
|
|
108
|
-
stats,
|
|
109
|
-
entrypoints = ['main'],
|
|
110
|
-
namespace = '',
|
|
111
|
-
outputPath = '/',
|
|
112
|
-
publicPath,
|
|
113
|
-
} = {}) {
|
|
114
|
-
this.namespace = namespace;
|
|
115
|
-
this.stats = stats || {};
|
|
116
|
-
const configuredPublicPath = publicPath || this.stats.publicPath;
|
|
117
|
-
this.publicPath =
|
|
118
|
-
!configuredPublicPath || isAutomaticPublicPath(configuredPublicPath)
|
|
119
|
-
? '/'
|
|
120
|
-
: configuredPublicPath;
|
|
121
|
-
this.outputPath = outputPath || this.stats.outputPath || '/';
|
|
122
|
-
this.entrypoints = Array.isArray(entrypoints) ? entrypoints : [entrypoints];
|
|
123
|
-
this.chunks = [];
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
addChunk(chunk) {
|
|
127
|
-
if (!this.chunks.includes(chunk)) {
|
|
128
|
-
this.chunks.push(chunk);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
collectChunks(app) {
|
|
133
|
-
return React.createElement(ChunkExtractorManager, { extractor: this }, app);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
getChunkGroup(chunk) {
|
|
137
|
-
return (
|
|
138
|
-
this.stats.namedChunkGroups?.[chunk] || {
|
|
139
|
-
assets: [],
|
|
140
|
-
childAssets: {},
|
|
141
|
-
chunks: [],
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
getChunkInfo(chunkId) {
|
|
147
|
-
return (this.stats.chunks || []).find(chunk => chunk.id === chunkId);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
resolvePublicUrl(filename) {
|
|
151
|
-
return joinUrl(this.publicPath, filename);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
createChunkAsset({ filename, chunk, type, linkType }) {
|
|
155
|
-
const resolvedFilename = getAssetName(filename);
|
|
156
|
-
const scriptType = assetScriptType(resolvedFilename);
|
|
157
|
-
|
|
158
|
-
if (!scriptType) {
|
|
159
|
-
return undefined;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
return {
|
|
163
|
-
filename: resolvedFilename,
|
|
164
|
-
integrity: getAssetIntegrity(filename),
|
|
165
|
-
scriptType,
|
|
166
|
-
chunk,
|
|
167
|
-
url: this.resolvePublicUrl(resolvedFilename),
|
|
168
|
-
path: String(resolvedFilename).replace(/^\/+/u, ''),
|
|
169
|
-
type,
|
|
170
|
-
linkType,
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
getChunkAssets(chunks) {
|
|
175
|
-
const one = chunk =>
|
|
176
|
-
getChunkGroupAssets(this.getChunkGroup(chunk))
|
|
177
|
-
.map(filename =>
|
|
178
|
-
this.createChunkAsset({
|
|
179
|
-
filename,
|
|
180
|
-
chunk,
|
|
181
|
-
type: 'mainAsset',
|
|
182
|
-
linkType: 'preload',
|
|
183
|
-
}),
|
|
184
|
-
)
|
|
185
|
-
.filter(Boolean);
|
|
186
|
-
|
|
187
|
-
return Array.isArray(chunks) ? uniqByUrl(chunks.flatMap(one)) : one(chunks);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
getChunkChildAssets(chunks, type) {
|
|
191
|
-
const one = chunk =>
|
|
192
|
-
getChunkGroupChildAssets(this.getChunkGroup(chunk), type)
|
|
193
|
-
.map(filename =>
|
|
194
|
-
this.createChunkAsset({
|
|
195
|
-
filename,
|
|
196
|
-
chunk,
|
|
197
|
-
type: 'childAsset',
|
|
198
|
-
linkType: type,
|
|
199
|
-
}),
|
|
200
|
-
)
|
|
201
|
-
.filter(Boolean);
|
|
202
|
-
|
|
203
|
-
return Array.isArray(chunks) ? uniqByUrl(chunks.flatMap(one)) : one(chunks);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
getChunkDependencies(chunks) {
|
|
207
|
-
const one = chunk =>
|
|
208
|
-
(this.getChunkGroup(chunk).chunks || []).filter(chunkId =>
|
|
209
|
-
chunkIncludesJs(this.getChunkInfo(chunkId)),
|
|
210
|
-
);
|
|
211
|
-
|
|
212
|
-
return Array.isArray(chunks)
|
|
213
|
-
? [...new Set(chunks.flatMap(one))]
|
|
214
|
-
: one(chunks);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
getRequiredChunksScriptContent() {
|
|
218
|
-
return JSON.stringify(this.getChunkDependencies(this.chunks));
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
getRequiredChunksNamesScriptContent() {
|
|
222
|
-
return JSON.stringify({ namedChunks: this.chunks });
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
getRequiredChunksScriptTag(extraProps = {}) {
|
|
226
|
-
const id = getRequiredChunkKey(this.namespace);
|
|
227
|
-
const props = `type="application/json"${extraPropsToString(extraProps)}`;
|
|
228
|
-
|
|
229
|
-
return [
|
|
230
|
-
`<script id="${id}" ${props}>${this.getRequiredChunksScriptContent()}</script>`,
|
|
231
|
-
`<script id="${id}_ext" ${props}>${this.getRequiredChunksNamesScriptContent()}</script>`,
|
|
232
|
-
].join('');
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
getMainAssets(scriptType) {
|
|
236
|
-
const assets = this.getChunkAssets([...this.entrypoints, ...this.chunks]);
|
|
237
|
-
|
|
238
|
-
return scriptType
|
|
239
|
-
? assets.filter(asset => asset.scriptType === scriptType)
|
|
240
|
-
: assets;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
getScriptTags(extraProps = {}) {
|
|
244
|
-
const scripts = this.getMainAssets('script').map(
|
|
245
|
-
asset =>
|
|
246
|
-
`<script async data-chunk="${asset.chunk}" src="${asset.url}"${extraPropsToString(extraProps)}></script>`,
|
|
247
|
-
);
|
|
248
|
-
|
|
249
|
-
return [this.getRequiredChunksScriptTag(extraProps), ...scripts].join('');
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
getStyleTags(extraProps = {}) {
|
|
253
|
-
return this.getMainAssets('style')
|
|
254
|
-
.map(
|
|
255
|
-
asset =>
|
|
256
|
-
`<link data-chunk="${asset.chunk}" rel="stylesheet" href="${asset.url}"${extraPropsToString(extraProps)}>`,
|
|
257
|
-
)
|
|
258
|
-
.join('');
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
getLinkTags(extraProps = {}) {
|
|
262
|
-
const assets = [
|
|
263
|
-
...this.getMainAssets(),
|
|
264
|
-
...this.getChunkChildAssets(
|
|
265
|
-
[...this.entrypoints, ...this.chunks],
|
|
266
|
-
'preload',
|
|
267
|
-
),
|
|
268
|
-
...this.getChunkChildAssets(
|
|
269
|
-
[...this.entrypoints, ...this.chunks],
|
|
270
|
-
'prefetch',
|
|
271
|
-
),
|
|
272
|
-
];
|
|
273
|
-
|
|
274
|
-
return uniqByUrl(assets)
|
|
275
|
-
.map(
|
|
276
|
-
asset =>
|
|
277
|
-
`<link data-chunk="${asset.chunk}" rel="${asset.linkType}" as="${asset.scriptType}" href="${asset.url}"${extraPropsToString(extraProps)}>`,
|
|
278
|
-
)
|
|
279
|
-
.join('');
|
|
280
|
-
}
|
|
281
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Workerd cannot initialize Module Federation's Node-oriented SSR data-fetch
|
|
3
|
-
* runtime. Cloudflare workers do not load native MF remotes, so retain the
|
|
4
|
-
* runtime-plugin contract without installing its server data-fetch hooks.
|
|
5
|
-
*/
|
|
6
|
-
export const injectDataFetchFunctionPlugin = () => ({
|
|
7
|
-
name: '@module-federation/inject-data-fetch-function-plugin',
|
|
8
|
-
setup() {},
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export const mfSSRDevPlugin = () => ({
|
|
12
|
-
name: '@module-federation/modern-js-v3',
|
|
13
|
-
setup() {},
|
|
14
|
-
});
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
const trimSlashes = value => String(value).replace(/^\/+|\/+$/gu, '');
|
|
2
|
-
const normalizeSeparators = value => String(value).replace(/\\+/gu, '/');
|
|
3
|
-
|
|
4
|
-
export const sep = '/';
|
|
5
|
-
export const delimiter = ':';
|
|
6
|
-
|
|
7
|
-
export function isAbsolute(filePath) {
|
|
8
|
-
return normalizeSeparators(filePath).startsWith('/');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function normalize(filePath) {
|
|
12
|
-
const normalized = normalizeSeparators(filePath);
|
|
13
|
-
const absolute = isAbsolute(normalized);
|
|
14
|
-
const parts = [];
|
|
15
|
-
|
|
16
|
-
for (const part of normalized.split('/')) {
|
|
17
|
-
if (!part || part === '.') {
|
|
18
|
-
continue;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (part === '..') {
|
|
22
|
-
if (parts.length > 0 && parts[parts.length - 1] !== '..') {
|
|
23
|
-
parts.pop();
|
|
24
|
-
} else if (!absolute) {
|
|
25
|
-
parts.push(part);
|
|
26
|
-
}
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
parts.push(part);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const joined = parts.join('/');
|
|
34
|
-
|
|
35
|
-
if (absolute) {
|
|
36
|
-
return joined ? `/${joined}` : '/';
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return joined || '.';
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function join(...segments) {
|
|
43
|
-
const joined = segments
|
|
44
|
-
.map(normalizeSeparators)
|
|
45
|
-
.filter(Boolean)
|
|
46
|
-
.map((segment, index) => (index === 0 ? segment : trimSlashes(segment)))
|
|
47
|
-
.filter(Boolean)
|
|
48
|
-
.join('/');
|
|
49
|
-
|
|
50
|
-
return joined ? normalize(joined) : '.';
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function resolve(...segments) {
|
|
54
|
-
const joined = join(...segments);
|
|
55
|
-
|
|
56
|
-
return joined.startsWith('/') ? joined : `/${joined}`;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function dirname(filePath) {
|
|
60
|
-
const normalized = normalizeSeparators(filePath).replace(/\/+$/u, '');
|
|
61
|
-
const index = normalized.lastIndexOf('/');
|
|
62
|
-
|
|
63
|
-
if (index <= 0) {
|
|
64
|
-
return '/';
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return normalized.slice(0, index);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export function basename(filePath, suffix = '') {
|
|
71
|
-
const normalized = normalizeSeparators(filePath).replace(/\/+$/u, '');
|
|
72
|
-
const base = normalized.slice(normalized.lastIndexOf('/') + 1);
|
|
73
|
-
|
|
74
|
-
return suffix && base.endsWith(suffix) ? base.slice(0, -suffix.length) : base;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function extname(filePath) {
|
|
78
|
-
const base = basename(filePath);
|
|
79
|
-
const index = base.lastIndexOf('.');
|
|
80
|
-
|
|
81
|
-
if (index <= 0) {
|
|
82
|
-
return '';
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return base.slice(index);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export default {
|
|
89
|
-
basename,
|
|
90
|
-
delimiter,
|
|
91
|
-
dirname,
|
|
92
|
-
extname,
|
|
93
|
-
isAbsolute,
|
|
94
|
-
join,
|
|
95
|
-
normalize,
|
|
96
|
-
resolve,
|
|
97
|
-
sep,
|
|
98
|
-
};
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
import loadableComponent from '@loadable/component';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
const internals =
|
|
5
|
-
loadableComponent?.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED || {};
|
|
6
|
-
const LoadableContext = internals.Context || React.createContext(null);
|
|
7
|
-
const getRequiredChunkKey =
|
|
8
|
-
internals.getRequiredChunkKey ||
|
|
9
|
-
(namespace => `${namespace}__LOADABLE_REQUIRED_CHUNKS__`);
|
|
10
|
-
|
|
11
|
-
const scriptExtensions = new Set(['.js', '.mjs']);
|
|
12
|
-
const styleExtensions = new Set(['.css']);
|
|
13
|
-
|
|
14
|
-
function uniqByUrl(assets) {
|
|
15
|
-
const seen = new Set();
|
|
16
|
-
|
|
17
|
-
return assets.filter(asset => {
|
|
18
|
-
if (seen.has(asset.url)) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
seen.add(asset.url);
|
|
23
|
-
return true;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function extname(filePath) {
|
|
28
|
-
const basename = String(filePath).split('/').pop() || '';
|
|
29
|
-
const index = basename.lastIndexOf('.');
|
|
30
|
-
|
|
31
|
-
return index > 0 ? basename.slice(index) : '';
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function isAutomaticPublicPath(publicPath) {
|
|
35
|
-
return publicPath === 'auto' || publicPath === 'auto/';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function joinUrl(publicPath, filename) {
|
|
39
|
-
const base =
|
|
40
|
-
!publicPath || isAutomaticPublicPath(publicPath) ? '/' : publicPath;
|
|
41
|
-
|
|
42
|
-
return `${base.replace(/\/+$/u, '')}/${String(filename).replace(/^\/+/u, '')}`;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function extraPropsToString(extraProps = {}) {
|
|
46
|
-
return Object.entries(extraProps)
|
|
47
|
-
.filter(([, value]) => value !== undefined && value !== false)
|
|
48
|
-
.map(([key, value]) => (value === true ? ` ${key}` : ` ${key}="${value}"`))
|
|
49
|
-
.join('');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function assetScriptType(filename) {
|
|
53
|
-
const extension = extname(filename);
|
|
54
|
-
|
|
55
|
-
if (scriptExtensions.has(extension)) {
|
|
56
|
-
return 'script';
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (styleExtensions.has(extension)) {
|
|
60
|
-
return 'style';
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function getAssetName(asset) {
|
|
65
|
-
return typeof asset === 'object' && asset?.name ? asset.name : asset;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function getAssetIntegrity(asset) {
|
|
69
|
-
return typeof asset === 'object' && asset?.integrity ? asset.integrity : null;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function getChunkGroupAssets(chunkGroup) {
|
|
73
|
-
const assets = chunkGroup?.assets;
|
|
74
|
-
|
|
75
|
-
if (Array.isArray(assets)) {
|
|
76
|
-
return assets;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (assets && typeof assets === 'object') {
|
|
80
|
-
return [...(assets.js || []), ...(assets.css || [])];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return [];
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function getChunkGroupChildAssets(chunkGroup, type) {
|
|
87
|
-
const childAssets = chunkGroup?.childAssets?.[type];
|
|
88
|
-
|
|
89
|
-
return Array.isArray(childAssets) ? childAssets : [];
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function chunkIncludesJs(chunkInfo) {
|
|
93
|
-
return (chunkInfo?.files || []).some(file =>
|
|
94
|
-
scriptExtensions.has(extname(file)),
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export function ChunkExtractorManager({ extractor, children }) {
|
|
99
|
-
return React.createElement(
|
|
100
|
-
LoadableContext.Provider,
|
|
101
|
-
{ value: extractor },
|
|
102
|
-
children,
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export class ChunkExtractor {
|
|
107
|
-
constructor({
|
|
108
|
-
stats,
|
|
109
|
-
entrypoints = ['main'],
|
|
110
|
-
namespace = '',
|
|
111
|
-
outputPath = '/',
|
|
112
|
-
publicPath,
|
|
113
|
-
} = {}) {
|
|
114
|
-
this.namespace = namespace;
|
|
115
|
-
this.stats = stats || {};
|
|
116
|
-
const configuredPublicPath = publicPath || this.stats.publicPath;
|
|
117
|
-
this.publicPath =
|
|
118
|
-
!configuredPublicPath || isAutomaticPublicPath(configuredPublicPath)
|
|
119
|
-
? '/'
|
|
120
|
-
: configuredPublicPath;
|
|
121
|
-
this.outputPath = outputPath || this.stats.outputPath || '/';
|
|
122
|
-
this.entrypoints = Array.isArray(entrypoints) ? entrypoints : [entrypoints];
|
|
123
|
-
this.chunks = [];
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
addChunk(chunk) {
|
|
127
|
-
if (!this.chunks.includes(chunk)) {
|
|
128
|
-
this.chunks.push(chunk);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
collectChunks(app) {
|
|
133
|
-
return React.createElement(ChunkExtractorManager, { extractor: this }, app);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
getChunkGroup(chunk) {
|
|
137
|
-
return (
|
|
138
|
-
this.stats.namedChunkGroups?.[chunk] || {
|
|
139
|
-
assets: [],
|
|
140
|
-
childAssets: {},
|
|
141
|
-
chunks: [],
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
getChunkInfo(chunkId) {
|
|
147
|
-
return (this.stats.chunks || []).find(chunk => chunk.id === chunkId);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
resolvePublicUrl(filename) {
|
|
151
|
-
return joinUrl(this.publicPath, filename);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
createChunkAsset({ filename, chunk, type, linkType }) {
|
|
155
|
-
const resolvedFilename = getAssetName(filename);
|
|
156
|
-
const scriptType = assetScriptType(resolvedFilename);
|
|
157
|
-
|
|
158
|
-
if (!scriptType) {
|
|
159
|
-
return undefined;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
return {
|
|
163
|
-
filename: resolvedFilename,
|
|
164
|
-
integrity: getAssetIntegrity(filename),
|
|
165
|
-
scriptType,
|
|
166
|
-
chunk,
|
|
167
|
-
url: this.resolvePublicUrl(resolvedFilename),
|
|
168
|
-
path: String(resolvedFilename).replace(/^\/+/u, ''),
|
|
169
|
-
type,
|
|
170
|
-
linkType,
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
getChunkAssets(chunks) {
|
|
175
|
-
const one = chunk =>
|
|
176
|
-
getChunkGroupAssets(this.getChunkGroup(chunk))
|
|
177
|
-
.map(filename =>
|
|
178
|
-
this.createChunkAsset({
|
|
179
|
-
filename,
|
|
180
|
-
chunk,
|
|
181
|
-
type: 'mainAsset',
|
|
182
|
-
linkType: 'preload',
|
|
183
|
-
}),
|
|
184
|
-
)
|
|
185
|
-
.filter(Boolean);
|
|
186
|
-
|
|
187
|
-
return Array.isArray(chunks) ? uniqByUrl(chunks.flatMap(one)) : one(chunks);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
getChunkChildAssets(chunks, type) {
|
|
191
|
-
const one = chunk =>
|
|
192
|
-
getChunkGroupChildAssets(this.getChunkGroup(chunk), type)
|
|
193
|
-
.map(filename =>
|
|
194
|
-
this.createChunkAsset({
|
|
195
|
-
filename,
|
|
196
|
-
chunk,
|
|
197
|
-
type: 'childAsset',
|
|
198
|
-
linkType: type,
|
|
199
|
-
}),
|
|
200
|
-
)
|
|
201
|
-
.filter(Boolean);
|
|
202
|
-
|
|
203
|
-
return Array.isArray(chunks) ? uniqByUrl(chunks.flatMap(one)) : one(chunks);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
getChunkDependencies(chunks) {
|
|
207
|
-
const one = chunk =>
|
|
208
|
-
(this.getChunkGroup(chunk).chunks || []).filter(chunkId =>
|
|
209
|
-
chunkIncludesJs(this.getChunkInfo(chunkId)),
|
|
210
|
-
);
|
|
211
|
-
|
|
212
|
-
return Array.isArray(chunks)
|
|
213
|
-
? [...new Set(chunks.flatMap(one))]
|
|
214
|
-
: one(chunks);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
getRequiredChunksScriptContent() {
|
|
218
|
-
return JSON.stringify(this.getChunkDependencies(this.chunks));
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
getRequiredChunksNamesScriptContent() {
|
|
222
|
-
return JSON.stringify({ namedChunks: this.chunks });
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
getRequiredChunksScriptTag(extraProps = {}) {
|
|
226
|
-
const id = getRequiredChunkKey(this.namespace);
|
|
227
|
-
const props = `type="application/json"${extraPropsToString(extraProps)}`;
|
|
228
|
-
|
|
229
|
-
return [
|
|
230
|
-
`<script id="${id}" ${props}>${this.getRequiredChunksScriptContent()}</script>`,
|
|
231
|
-
`<script id="${id}_ext" ${props}>${this.getRequiredChunksNamesScriptContent()}</script>`,
|
|
232
|
-
].join('');
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
getMainAssets(scriptType) {
|
|
236
|
-
const assets = this.getChunkAssets([...this.entrypoints, ...this.chunks]);
|
|
237
|
-
|
|
238
|
-
return scriptType
|
|
239
|
-
? assets.filter(asset => asset.scriptType === scriptType)
|
|
240
|
-
: assets;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
getScriptTags(extraProps = {}) {
|
|
244
|
-
const scripts = this.getMainAssets('script').map(
|
|
245
|
-
asset =>
|
|
246
|
-
`<script async data-chunk="${asset.chunk}" src="${asset.url}"${extraPropsToString(extraProps)}></script>`,
|
|
247
|
-
);
|
|
248
|
-
|
|
249
|
-
return [this.getRequiredChunksScriptTag(extraProps), ...scripts].join('');
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
getStyleTags(extraProps = {}) {
|
|
253
|
-
return this.getMainAssets('style')
|
|
254
|
-
.map(
|
|
255
|
-
asset =>
|
|
256
|
-
`<link data-chunk="${asset.chunk}" rel="stylesheet" href="${asset.url}"${extraPropsToString(extraProps)}>`,
|
|
257
|
-
)
|
|
258
|
-
.join('');
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
getLinkTags(extraProps = {}) {
|
|
262
|
-
const assets = [
|
|
263
|
-
...this.getMainAssets(),
|
|
264
|
-
...this.getChunkChildAssets(
|
|
265
|
-
[...this.entrypoints, ...this.chunks],
|
|
266
|
-
'preload',
|
|
267
|
-
),
|
|
268
|
-
...this.getChunkChildAssets(
|
|
269
|
-
[...this.entrypoints, ...this.chunks],
|
|
270
|
-
'prefetch',
|
|
271
|
-
),
|
|
272
|
-
];
|
|
273
|
-
|
|
274
|
-
return uniqByUrl(assets)
|
|
275
|
-
.map(
|
|
276
|
-
asset =>
|
|
277
|
-
`<link data-chunk="${asset.chunk}" rel="${asset.linkType}" as="${asset.scriptType}" href="${asset.url}"${extraPropsToString(extraProps)}>`,
|
|
278
|
-
)
|
|
279
|
-
.join('');
|
|
280
|
-
}
|
|
281
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Workerd cannot initialize Module Federation's Node-oriented SSR data-fetch
|
|
3
|
-
* runtime. Cloudflare workers do not load native MF remotes, so retain the
|
|
4
|
-
* runtime-plugin contract without installing its server data-fetch hooks.
|
|
5
|
-
*/
|
|
6
|
-
export const injectDataFetchFunctionPlugin = () => ({
|
|
7
|
-
name: '@module-federation/inject-data-fetch-function-plugin',
|
|
8
|
-
setup() {},
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export const mfSSRDevPlugin = () => ({
|
|
12
|
-
name: '@module-federation/modern-js-v3',
|
|
13
|
-
setup() {},
|
|
14
|
-
});
|