@module-federation/data-prefetch 1.0.16 → 2.0.1

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.
Files changed (98) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +3 -1
  3. package/dist/LICENSE +21 -0
  4. package/dist/babel.cjs +95 -0
  5. package/dist/babel.d.ts +1 -0
  6. package/dist/babel.js +5 -0
  7. package/dist/cli/babel.cjs +115 -0
  8. package/dist/cli/babel.d.ts +2 -4
  9. package/dist/cli/babel.js +50 -82
  10. package/dist/cli/index.cjs +217 -0
  11. package/dist/cli/index.d.ts +5 -8
  12. package/dist/cli/index.js +150 -197
  13. package/dist/cli.cjs +95 -0
  14. package/dist/cli.d.ts +1 -0
  15. package/dist/cli.js +5 -0
  16. package/dist/common/constant.cjs +51 -0
  17. package/dist/common/constant.d.ts +1 -0
  18. package/dist/common/constant.js +5 -0
  19. package/dist/common/index.cjs +95 -0
  20. package/dist/common/index.js +5 -0
  21. package/dist/common/node-utils.cjs +100 -0
  22. package/dist/common/node-utils.d.ts +2 -0
  23. package/dist/common/node-utils.js +35 -0
  24. package/dist/common/runtime-utils.cjs +84 -0
  25. package/dist/common/runtime-utils.d.ts +5 -0
  26. package/dist/common/runtime-utils.js +29 -0
  27. package/dist/constant.cjs +51 -0
  28. package/dist/constant.d.ts +1 -0
  29. package/dist/constant.js +5 -0
  30. package/dist/index.cjs +106 -0
  31. package/dist/index.d.ts +2 -5
  32. package/dist/index.js +3 -346
  33. package/dist/logger/index.cjs +60 -0
  34. package/dist/logger/index.d.ts +2 -0
  35. package/dist/logger/index.js +10 -0
  36. package/dist/plugin.cjs +234 -0
  37. package/dist/plugin.d.ts +3 -5
  38. package/dist/plugin.js +167 -340
  39. package/dist/prefetch.cjs +197 -0
  40. package/dist/{prefetch-4e9646e4.d.ts → prefetch.d.ts} +14 -17
  41. package/dist/prefetch.js +149 -0
  42. package/dist/react/hooks.cjs +144 -0
  43. package/dist/react/hooks.d.ts +11 -0
  44. package/dist/react/hooks.js +86 -0
  45. package/dist/react/index.cjs +95 -0
  46. package/dist/react/index.d.ts +1 -16
  47. package/dist/react/index.js +2 -283
  48. package/dist/react/utils.cjs +65 -0
  49. package/dist/react/utils.d.ts +1 -0
  50. package/dist/react/utils.js +15 -0
  51. package/dist/react.cjs +95 -0
  52. package/dist/react.d.ts +1 -0
  53. package/dist/react.js +5 -0
  54. package/dist/universal/index.cjs +81 -0
  55. package/dist/universal/index.d.ts +2 -8
  56. package/dist/universal/index.js +24 -196
  57. package/dist/universal.cjs +95 -0
  58. package/dist/universal.d.ts +1 -0
  59. package/dist/universal.js +5 -0
  60. package/package.json +76 -40
  61. package/CHANGELOG.md +0 -9
  62. package/__tests__/babel.spec.ts +0 -75
  63. package/__tests__/prefetch.spec.ts +0 -138
  64. package/__tests__/react.spec.ts +0 -119
  65. package/dist/esm/chunk-AJPO2B2T.js +0 -30
  66. package/dist/esm/chunk-EZUCZHGV.js +0 -11
  67. package/dist/esm/chunk-ISLXMAIA.js +0 -155
  68. package/dist/esm/chunk-KI4QGPIS.js +0 -32
  69. package/dist/esm/chunk-TTJJJ2WZ.js +0 -7
  70. package/dist/esm/chunk-VVZ6XIM6.js +0 -166
  71. package/dist/esm/cli/babel.js +0 -57
  72. package/dist/esm/cli/index.js +0 -178
  73. package/dist/esm/index.js +0 -13
  74. package/dist/esm/plugin.js +0 -12
  75. package/dist/esm/react/index.js +0 -94
  76. package/dist/esm/shared/index.js +0 -27
  77. package/dist/esm/universal/index.js +0 -9
  78. package/dist/shared/index.d.ts +0 -5
  79. package/dist/shared/index.js +0 -48
  80. package/jest.config.js +0 -29
  81. package/project.json +0 -21
  82. package/src/cli/babel.ts +0 -94
  83. package/src/cli/index.ts +0 -171
  84. package/src/common/constant.ts +0 -1
  85. package/src/common/node-utils.ts +0 -24
  86. package/src/common/runtime-utils.ts +0 -34
  87. package/src/index.ts +0 -2
  88. package/src/logger/index.ts +0 -3
  89. package/src/plugin.ts +0 -191
  90. package/src/prefetch.ts +0 -207
  91. package/src/react/hooks.ts +0 -95
  92. package/src/react/index.ts +0 -1
  93. package/src/react/utils.ts +0 -11
  94. package/src/shared/index.ts +0 -26
  95. package/src/universal/index.ts +0 -27
  96. package/tsconfig.json +0 -27
  97. package/tsup.config.ts +0 -35
  98. /package/{src/common/index.ts → dist/common/index.d.ts} +0 -0
package/dist/plugin.js CHANGED
@@ -1,346 +1,173 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ import { getResourceUrl } from "@module-federation/sdk";
2
+ import { getSignalFromManifest } from "./common/runtime-utils.js";
3
+ import { MFDataPrefetch } from "./prefetch.js";
4
+ import logger from "./logger/index.js";
5
+ import { SHARED_STRATEGY } from "./constant.js";
19
6
 
20
- // src/plugin.ts
21
- var plugin_exports = {};
22
- __export(plugin_exports, {
23
- default: () => plugin_default,
24
- prefetchPlugin: () => prefetchPlugin
25
- });
26
- module.exports = __toCommonJS(plugin_exports);
27
- var import_sdk4 = require("@module-federation/sdk");
7
+ ;// CONCATENATED MODULE: external "@module-federation/sdk"
28
8
 
29
- // src/common/runtime-utils.ts
30
- var import_runtime = require("@module-federation/runtime");
31
- var import_sdk = require("@module-federation/sdk");
32
- var getPrefetchId = (id) => (0, import_sdk.encodeName)(`${id}/${import_sdk.MFPrefetchCommon.identifier}`);
33
- var compatGetPrefetchId = (id) => (0, import_sdk.encodeName)(`${id}/VmokPrefetch`);
34
- var getSignalFromManifest = (remoteSnapshot) => {
35
- if (!remoteSnapshot) {
36
- return false;
37
- }
38
- if (!("prefetchEntry" in remoteSnapshot) && !("prefetchInterface" in remoteSnapshot)) {
39
- return false;
40
- }
41
- if (!remoteSnapshot.prefetchEntry && !remoteSnapshot.prefetchInterface) {
42
- return false;
43
- }
44
- return true;
45
- };
9
+ ;// CONCATENATED MODULE: external "./common/runtime-utils.js"
46
10
 
47
- // src/prefetch.ts
48
- var import_runtime2 = require("@module-federation/runtime");
49
- var import_sdk2 = require("@module-federation/sdk");
50
- globalThis.__FEDERATION__ ?? (globalThis.__FEDERATION__ = {});
51
- var _a;
52
- (_a = globalThis.__FEDERATION__).__PREFETCH__ ?? (_a.__PREFETCH__ = {
53
- entryLoading: {},
54
- instance: /* @__PURE__ */ new Map(),
55
- __PREFETCH_EXPORTS__: {}
56
- });
57
- var MFDataPrefetch = class {
58
- constructor(options) {
59
- this.prefetchMemory = /* @__PURE__ */ new Map();
60
- this.recordOutdate = {};
61
- this._exports = {};
62
- this._options = options;
63
- this.global.instance.set(options.name, this);
64
- }
65
- get global() {
66
- return globalThis.__FEDERATION__.__PREFETCH__;
67
- }
68
- static getInstance(id) {
69
- return globalThis.__FEDERATION__.__PREFETCH__.instance.get(id);
70
- }
71
- async loadEntry(entry) {
72
- const { name, remoteSnapshot, remote, origin } = this._options;
73
- if (entry) {
74
- const { buildVersion, globalName } = remoteSnapshot;
75
- const uniqueKey = globalName || `${name}:${buildVersion}`;
76
- if (!this.global.entryLoading[uniqueKey]) {
77
- this.global.entryLoading[uniqueKey] = (0, import_sdk2.loadScript)(entry, {});
78
- }
79
- return this.global.entryLoading[uniqueKey];
80
- } else {
81
- const remoteInfo = (0, import_runtime2.getRemoteInfo)(remote);
82
- const module2 = origin.moduleCache.get(remoteInfo.name);
83
- return (0, import_runtime2.getRemoteEntry)({
84
- origin,
85
- remoteInfo,
86
- remoteEntryExports: module2 ? module2.remoteEntryExports : void 0
87
- });
88
- }
89
- }
90
- getProjectExports() {
91
- var _a2;
92
- if (Object.keys(this._exports).length > 0) {
93
- return this._exports;
94
- }
95
- const { name } = this._options;
96
- const exportsPromise = (_a2 = globalThis.__FEDERATION__.__PREFETCH__.__PREFETCH_EXPORTS__) == null ? void 0 : _a2[name];
97
- const resolve = exportsPromise.then(
98
- (exports = {}) => {
99
- const memory = {};
100
- Object.keys(exports).forEach((key) => {
101
- memory[key] = {};
102
- const exportVal = exports[key];
103
- Object.keys(exportVal).reduce(
104
- (memo, current) => {
105
- if (current.toLocaleLowerCase().endsWith("prefetch") || current.toLocaleLowerCase() === "default") {
106
- memo[current] = exportVal[current];
107
- }
108
- return memo;
109
- },
110
- memory[key]
111
- );
112
- });
113
- this.memorizeExports(memory);
114
- }
115
- );
116
- return resolve;
117
- }
118
- memorizeExports(exports) {
119
- this._exports = exports;
120
- }
121
- getExposeExports(id) {
122
- const prefetchId = getPrefetchId(id);
123
- const compatId = compatGetPrefetchId(id);
124
- const prefetchExports = this._exports[prefetchId] || this._exports[compatId];
125
- return prefetchExports || {};
126
- }
127
- prefetch(prefetchOptions) {
128
- const { id, functionId = "default", refetchParams } = prefetchOptions;
129
- let prefetchResult;
130
- const prefetchId = getPrefetchId(id);
131
- const compatId = compatGetPrefetchId(id);
132
- const memorizeId = id + functionId;
133
- const memory = this.prefetchMemory.get(memorizeId);
134
- if (!this.checkOutdate(prefetchOptions) && memory) {
135
- return memory;
136
- }
137
- const prefetchExports = this._exports[prefetchId] || this._exports[compatId];
138
- if (!prefetchExports) {
139
- return;
140
- }
141
- const executePrefetch = prefetchExports[functionId];
142
- if (typeof executePrefetch === "function") {
143
- if (refetchParams) {
144
- prefetchResult = executePrefetch(refetchParams);
145
- } else {
146
- prefetchResult = executePrefetch();
147
- }
148
- } else {
149
- throw new Error(
150
- `[Module Federation Data Prefetch]: No prefetch function called ${functionId} export in prefetch file`
151
- );
152
- }
153
- this.memorize(memorizeId, prefetchResult);
154
- return prefetchResult;
155
- }
156
- memorize(id, value) {
157
- this.prefetchMemory.set(id, value);
158
- }
159
- markOutdate(markOptions, isOutdate) {
160
- const { id, functionId = "default" } = markOptions;
161
- if (!this.recordOutdate[id]) {
162
- this.recordOutdate[id] = {};
163
- }
164
- this.recordOutdate[id][functionId] = isOutdate;
165
- }
166
- checkOutdate(outdateOptions) {
167
- const { id, functionId = "default", cacheStrategy } = outdateOptions;
168
- if (typeof cacheStrategy === "function") {
169
- return cacheStrategy();
170
- }
171
- if (!this.recordOutdate[id]) {
172
- this.recordOutdate[id] = {};
173
- }
174
- if (this.recordOutdate[id][functionId]) {
175
- this.markOutdate(
176
- {
177
- id,
178
- functionId
179
- },
180
- false
181
- );
182
- return true;
183
- } else {
184
- return false;
185
- }
186
- }
187
- };
11
+ ;// CONCATENATED MODULE: external "./prefetch.js"
188
12
 
189
- // src/logger/index.ts
190
- var import_sdk3 = require("@module-federation/sdk");
191
- var logger_default = new import_sdk3.Logger("[Module Federation Data Prefetch]");
13
+ ;// CONCATENATED MODULE: external "./logger/index.js"
192
14
 
193
- // src/plugin.ts
194
- var loadingArray = [];
195
- var strategy = "loaded-first";
196
- var sharedFlag = strategy;
197
- var prefetchPlugin = () => ({
198
- name: "data-prefetch-runtime-plugin",
199
- initContainer(options) {
200
- const { remoteSnapshot, remoteInfo, id, origin } = options;
201
- const snapshot = remoteSnapshot;
202
- const { name } = remoteInfo;
203
- const prefetchOptions = {
204
- name,
205
- remote: remoteInfo,
206
- origin,
207
- remoteSnapshot: snapshot
208
- };
209
- const signal = getSignalFromManifest(snapshot);
210
- if (!signal) {
211
- return options;
212
- }
213
- if (sharedFlag !== strategy) {
214
- throw new Error(
215
- `[Module Federation Data Prefetch]: If you want to use data prefetch, the shared strategy must be 'loaded-first'`
216
- );
217
- }
218
- const instance = MFDataPrefetch.getInstance(name) || new MFDataPrefetch(prefetchOptions);
219
- let prefetchUrl;
220
- if (snapshot.prefetchEntry) {
221
- prefetchUrl = (0, import_sdk4.getResourceUrl)(snapshot, snapshot.prefetchEntry);
222
- }
223
- const exist = loadingArray.find((loading) => loading.id === id);
224
- if (exist) {
225
- return options;
226
- }
227
- const promise = instance.loadEntry(prefetchUrl).then(async () => {
228
- const projectExports = instance.getProjectExports();
229
- if (projectExports instanceof Promise) {
230
- await projectExports;
231
- }
232
- return Promise.resolve().then(() => {
233
- const exports = instance.getExposeExports(id);
234
- logger_default.info(
235
- `1. Start Prefetch initContainer: ${id} - ${performance.now()}`
236
- );
237
- const result = Object.keys(exports).map((k) => {
238
- const value = instance.prefetch({
239
- id,
240
- functionId: k
241
- });
242
- const functionId = k;
243
- return {
244
- value,
245
- functionId
246
- };
247
- });
248
- return result;
249
- });
250
- });
251
- loadingArray.push({
252
- id,
253
- promise
254
- });
255
- return options;
256
- },
257
- afterResolve(options) {
258
- const { remoteSnapshot, remoteInfo, id, origin } = options;
259
- const snapshot = remoteSnapshot;
260
- const { name } = remoteInfo;
261
- const prefetchOptions = {
262
- name,
263
- remote: remoteInfo,
264
- origin,
265
- remoteSnapshot: snapshot
266
- };
267
- const signal = getSignalFromManifest(snapshot);
268
- if (!signal) {
269
- return options;
270
- }
271
- const inited = loadingArray.some((info) => info.id === id);
272
- if (!inited) {
273
- return options;
274
- }
275
- if (sharedFlag !== strategy) {
276
- throw new Error(
277
- `[Module Federation Data Prefetch]: If you want to use data prefetch, the shared strategy must be 'loaded-first'`
278
- );
279
- }
280
- const instance = MFDataPrefetch.getInstance(name) || new MFDataPrefetch(prefetchOptions);
281
- let prefetchUrl;
282
- if (snapshot.prefetchEntry) {
283
- prefetchUrl = (0, import_sdk4.getResourceUrl)(snapshot, snapshot.prefetchEntry);
284
- }
285
- const index = loadingArray.findIndex((loading) => loading.id === id);
286
- if (index !== -1) {
287
- loadingArray.splice(index, 1);
288
- }
289
- const promise = instance.loadEntry(prefetchUrl).then(async () => {
290
- const projectExports = instance.getProjectExports();
291
- if (projectExports instanceof Promise) {
292
- await projectExports;
293
- }
294
- return Promise.resolve().then(() => {
295
- const exports = instance.getExposeExports(id);
296
- logger_default.info(
297
- `1. Start Prefetch afterResolve: ${id} - ${performance.now()}`
298
- );
299
- const result = Object.keys(exports).map((k) => {
300
- const value = instance.prefetch({
301
- id,
302
- functionId: k
303
- });
304
- const functionId = k;
305
- return {
306
- value,
307
- functionId
308
- };
309
- });
310
- return result;
311
- });
312
- });
313
- loadingArray.push({
314
- id,
315
- promise
15
+ ;// CONCATENATED MODULE: external "./constant.js"
16
+
17
+ ;// CONCATENATED MODULE: ./src/plugin.ts
18
+
19
+
20
+
21
+
22
+
23
+ const loadingArray = [];
24
+ let sharedFlag = SHARED_STRATEGY;
25
+ // eslint-disable-next-line max-lines-per-function
26
+ const prefetchPlugin = ()=>({
27
+ name: 'data-prefetch-runtime-plugin',
28
+ initContainer (options) {
29
+ const { remoteSnapshot, remoteInfo, id, origin } = options;
30
+ if (!id) {
31
+ return options;
32
+ }
33
+ const snapshot = remoteSnapshot;
34
+ const { name } = remoteInfo;
35
+ const prefetchOptions = {
36
+ name,
37
+ remote: remoteInfo,
38
+ origin,
39
+ remoteSnapshot: snapshot
40
+ };
41
+ const signal = getSignalFromManifest(snapshot);
42
+ if (!signal) {
43
+ return options;
44
+ }
45
+ if (sharedFlag !== SHARED_STRATEGY) {
46
+ throw new Error(`[Module Federation Data Prefetch]: If you want to use data prefetch, the shared strategy must be 'loaded-first'`);
47
+ }
48
+ const instance = MFDataPrefetch.getInstance(name) || new MFDataPrefetch(prefetchOptions);
49
+ let prefetchUrl;
50
+ // @ts-expect-error
51
+ if (snapshot.prefetchEntry) {
52
+ // @ts-expect-error
53
+ prefetchUrl = getResourceUrl(snapshot, snapshot.prefetchEntry);
54
+ }
55
+ const exist = loadingArray.find((loading)=>loading.id === id);
56
+ if (exist) {
57
+ return options;
58
+ }
59
+ const promise = instance.loadEntry(prefetchUrl).then(async ()=>{
60
+ const projectExports = instance.getProjectExports();
61
+ if (projectExports instanceof Promise) {
62
+ await projectExports;
63
+ }
64
+ return Promise.resolve().then(()=>{
65
+ const exports = instance.getExposeExports(id);
66
+ logger.info(`1. Start Prefetch initContainer: ${id} - ${performance.now()}`);
67
+ const result = Object.keys(exports).map((k)=>{
68
+ const value = instance.prefetch({
69
+ id,
70
+ functionId: k
71
+ });
72
+ const functionId = k;
73
+ return {
74
+ value,
75
+ functionId
76
+ };
77
+ });
78
+ return result;
79
+ });
80
+ });
81
+ loadingArray.push({
82
+ id,
83
+ promise
84
+ });
85
+ return options;
86
+ },
87
+ afterResolve (options) {
88
+ const { remoteSnapshot, remoteInfo, id, origin } = options;
89
+ const snapshot = remoteSnapshot;
90
+ const { name } = remoteInfo;
91
+ const prefetchOptions = {
92
+ name,
93
+ remote: remoteInfo,
94
+ origin,
95
+ remoteSnapshot: snapshot
96
+ };
97
+ const signal = getSignalFromManifest(snapshot);
98
+ if (!signal) {
99
+ return options;
100
+ }
101
+ const inited = loadingArray.some((info)=>info.id === id);
102
+ if (!inited) {
103
+ return options;
104
+ }
105
+ if (sharedFlag !== SHARED_STRATEGY) {
106
+ throw new Error(`[Module Federation Data Prefetch]: If you want to use data prefetch, the shared strategy must be 'loaded-first'`);
107
+ }
108
+ const instance = MFDataPrefetch.getInstance(name) || new MFDataPrefetch(prefetchOptions);
109
+ let prefetchUrl;
110
+ // @ts-expect-error
111
+ if (snapshot.prefetchEntry) {
112
+ // @ts-expect-error
113
+ prefetchUrl = getResourceUrl(snapshot, snapshot.prefetchEntry);
114
+ }
115
+ const index = loadingArray.findIndex((loading)=>loading.id === id);
116
+ // clear cache
117
+ if (index !== -1) {
118
+ loadingArray.splice(index, 1);
119
+ }
120
+ const promise = instance.loadEntry(prefetchUrl).then(async ()=>{
121
+ const projectExports = instance.getProjectExports();
122
+ if (projectExports instanceof Promise) {
123
+ await projectExports;
124
+ }
125
+ return Promise.resolve().then(()=>{
126
+ const exports = instance.getExposeExports(id);
127
+ logger.info(`1. Start Prefetch afterResolve: ${id} - ${performance.now()}`);
128
+ const result = Object.keys(exports).map((k)=>{
129
+ const value = instance.prefetch({
130
+ id,
131
+ functionId: k
132
+ });
133
+ const functionId = k;
134
+ return {
135
+ value,
136
+ functionId
137
+ };
138
+ });
139
+ return result;
140
+ });
141
+ });
142
+ loadingArray.push({
143
+ id,
144
+ promise
145
+ });
146
+ return options;
147
+ },
148
+ async onLoad (options) {
149
+ var _loadingArray_find;
150
+ const { remote, id } = options;
151
+ const { name } = remote;
152
+ const promise = (_loadingArray_find = loadingArray.find((loading)=>loading.id === id)) === null || _loadingArray_find === void 0 ? void 0 : _loadingArray_find.promise;
153
+ if (promise) {
154
+ const prefetch = await promise;
155
+ const prefetchValue = prefetch.map((result)=>result.value);
156
+ await Promise.all(prefetchValue);
157
+ const instance = MFDataPrefetch.getInstance(name);
158
+ prefetch.forEach((result)=>{
159
+ const { value, functionId } = result;
160
+ instance.memorize(id + functionId, value);
161
+ });
162
+ }
163
+ return options;
164
+ },
165
+ beforeLoadShare (options) {
166
+ const shareInfo = options.shareInfo;
167
+ sharedFlag = (shareInfo === null || shareInfo === void 0 ? void 0 : shareInfo.strategy) || sharedFlag;
168
+ return options;
169
+ }
316
170
  });
317
- return options;
318
- },
319
- async onLoad(options) {
320
- var _a2;
321
- const { remote, id } = options;
322
- const { name } = remote;
323
- const promise = (_a2 = loadingArray.find((loading) => loading.id === id)) == null ? void 0 : _a2.promise;
324
- if (promise) {
325
- const prefetch = await promise;
326
- const prefetchValue = prefetch.map((result) => result.value);
327
- await Promise.all(prefetchValue);
328
- const instance = MFDataPrefetch.getInstance(name);
329
- prefetch.forEach((result) => {
330
- const { value, functionId } = result;
331
- instance.memorize(id + functionId, value);
332
- });
333
- }
334
- return options;
335
- },
336
- beforeLoadShare(options) {
337
- const shareInfo = options.shareInfo;
338
- sharedFlag = (shareInfo == null ? void 0 : shareInfo.strategy) || sharedFlag;
339
- return options;
340
- }
341
- });
342
- var plugin_default = prefetchPlugin;
343
- // Annotate the CommonJS export names for ESM import in node:
344
- 0 && (module.exports = {
345
- prefetchPlugin
346
- });
171
+ /* ESM default export */ const src_plugin = (prefetchPlugin);
172
+
173
+ export { src_plugin as default, prefetchPlugin };