@module-federation/sdk 0.11.3 → 0.11.4
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/index.cjs.js
CHANGED
|
@@ -202,6 +202,9 @@ const getResourceUrl = (module, sourceUrl)=>{
|
|
|
202
202
|
}
|
|
203
203
|
return `${publicPath}${sourceUrl}`;
|
|
204
204
|
} else if ('publicPath' in module) {
|
|
205
|
+
if (!isBrowserEnv() && !isReactNativeEnv() && 'ssrPublicPath' in module) {
|
|
206
|
+
return `${module.ssrPublicPath}${sourceUrl}`;
|
|
207
|
+
}
|
|
205
208
|
return `${module.publicPath}${sourceUrl}`;
|
|
206
209
|
} else {
|
|
207
210
|
console.warn('Cannot get resource URL. If in debug mode, please ignore.', module, sourceUrl);
|
|
@@ -349,7 +352,8 @@ function generateSnapshotFromManifest(manifest, options = {}) {
|
|
|
349
352
|
}
|
|
350
353
|
if ('publicPath' in manifest.metaData) {
|
|
351
354
|
remoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
|
|
352
|
-
publicPath: getPublicPath()
|
|
355
|
+
publicPath: getPublicPath(),
|
|
356
|
+
ssrPublicPath: manifest.metaData.ssrPublicPath
|
|
353
357
|
});
|
|
354
358
|
} else {
|
|
355
359
|
remoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
|
package/dist/index.esm.mjs
CHANGED
|
@@ -200,6 +200,9 @@ const getResourceUrl = (module, sourceUrl)=>{
|
|
|
200
200
|
}
|
|
201
201
|
return `${publicPath}${sourceUrl}`;
|
|
202
202
|
} else if ('publicPath' in module) {
|
|
203
|
+
if (!isBrowserEnv() && !isReactNativeEnv() && 'ssrPublicPath' in module) {
|
|
204
|
+
return `${module.ssrPublicPath}${sourceUrl}`;
|
|
205
|
+
}
|
|
203
206
|
return `${module.publicPath}${sourceUrl}`;
|
|
204
207
|
} else {
|
|
205
208
|
console.warn('Cannot get resource URL. If in debug mode, please ignore.', module, sourceUrl);
|
|
@@ -347,7 +350,8 @@ function generateSnapshotFromManifest(manifest, options = {}) {
|
|
|
347
350
|
}
|
|
348
351
|
if ('publicPath' in manifest.metaData) {
|
|
349
352
|
remoteSnapshot = _extends({}, basicRemoteSnapshot, {
|
|
350
|
-
publicPath: getPublicPath()
|
|
353
|
+
publicPath: getPublicPath(),
|
|
354
|
+
ssrPublicPath: manifest.metaData.ssrPublicPath
|
|
351
355
|
});
|
|
352
356
|
} else {
|
|
353
357
|
remoteSnapshot = _extends({}, basicRemoteSnapshot, {
|
|
@@ -114,7 +114,7 @@ export interface DtsRemoteOptions {
|
|
|
114
114
|
deleteTypesFolder?: boolean;
|
|
115
115
|
additionalFilesToCompile?: string[];
|
|
116
116
|
compileInChildProcess?: boolean;
|
|
117
|
-
compilerInstance?: 'tsc' | 'vue-tsc';
|
|
117
|
+
compilerInstance?: 'tsc' | 'vue-tsc' | 'tspc' | string;
|
|
118
118
|
generateAPITypes?: boolean;
|
|
119
119
|
extractThirdParty?: boolean;
|
|
120
120
|
extractRemoteTypes?: boolean;
|
|
@@ -38,6 +38,7 @@ export interface BasicProviderModuleInfo extends BasicModuleInfo {
|
|
|
38
38
|
}
|
|
39
39
|
interface BasicProviderModuleInfoWithPublicPath extends BasicProviderModuleInfo {
|
|
40
40
|
publicPath: string;
|
|
41
|
+
ssrPublicPath?: string;
|
|
41
42
|
}
|
|
42
43
|
interface BasicProviderModuleInfoWithGetPublicPath extends BasicProviderModuleInfo {
|
|
43
44
|
getPublicPath: string;
|
|
@@ -55,6 +56,7 @@ interface BasicConsumerModuleInfo extends BasicModuleInfo {
|
|
|
55
56
|
}
|
|
56
57
|
export interface ConsumerModuleInfoWithPublicPath extends BasicConsumerModuleInfo, BasicProviderModuleInfo {
|
|
57
58
|
publicPath: string;
|
|
59
|
+
ssrPublicPath?: string;
|
|
58
60
|
}
|
|
59
61
|
interface ConsumerModuleInfoWithGetPublicPath extends BasicConsumerModuleInfo, BasicProviderModuleInfo {
|
|
60
62
|
getPublicPath: string;
|
|
@@ -32,6 +32,7 @@ type StatsMetaDataWithGetPublicPath<T = BasicStatsMetaData> = T & {
|
|
|
32
32
|
};
|
|
33
33
|
type StatsMetaDataWithPublicPath<T = BasicStatsMetaData> = T & {
|
|
34
34
|
publicPath: string;
|
|
35
|
+
ssrPublicPath?: string;
|
|
35
36
|
};
|
|
36
37
|
export type StatsMetaData<T = BasicStatsMetaData> = StatsMetaDataWithGetPublicPath<T> | StatsMetaDataWithPublicPath<T>;
|
|
37
38
|
export interface StatsAssets {
|