Skip to content

Commit b56a3d3

Browse files
fix(dts-plugin): build zip url for json
1 parent 3c57a61 commit b56a3d3

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.changeset/chatty-lies-rush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/dts-plugin': patch
3+
---
4+
5+
Build zip url for json ext as well

packages/dts-plugin/src/core/configurations/hostPlugin.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ const defaultOptions = {
1717
const buildZipUrl = (hostOptions: Required<HostOptions>, url: string) => {
1818
const remoteUrl = new URL(url);
1919

20-
if (remoteUrl.href.includes(MANIFEST_EXT)) {
21-
return undefined;
22-
}
2320
const pathnameWithoutEntry = remoteUrl.pathname
2421
.split('/')
2522
.slice(0, -1)
@@ -51,6 +48,7 @@ const retrieveRemoteInfo = (options: {
5148
: parsedInfo.name === remote
5249
? remote
5350
: '';
51+
5452
const zipUrl = url ? buildZipUrl(hostOptions, url) : '';
5553

5654
return {

packages/manifest/src/ManifestManager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ class ManifestManager {
126126

127127
if (isDev()) {
128128
console.log(
129-
chalk`{bold {greenBright [ ${PLUGIN_IDENTIFIER} ]} {greenBright Manifest Link:} {cyan ${publicPath}${manifestFileName}}}`,
129+
chalk`{bold {greenBright [ ${PLUGIN_IDENTIFIER} ]} {greenBright Manifest Link:} {cyan ${
130+
publicPath === 'auto' ? '{auto}/' : publicPath
131+
}${manifestFileName}}}`,
130132
);
131133
}
132134
}

0 commit comments

Comments
 (0)