We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ae5353 commit 5b637c3Copy full SHA for 5b637c3
.changeset/nice-suns-eat.md
@@ -0,0 +1,5 @@
1
+---
2
+'@module-federation/data-prefetch': patch
3
4
+
5
+fix(data-prefetch): the prefetch exports type is promise or function
packages/data-prefetch/src/prefetch.ts
@@ -99,7 +99,7 @@ export class MFDataPrefetch {
99
const exportsPromise =
100
typeof exportsPromiseFn === 'function'
101
? exportsPromiseFn()
102
- : Promise.resolve({});
+ : exportsPromiseFn;
103
const resolve = exportsPromise.then(
104
(exports: Record<string, Record<string, any>> = {}) => {
105
// Match prefetch based on the function name suffix so that other capabilities can be expanded later.
0 commit comments