Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libs/native-federation-core/src/lib/core/bundle-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function bundleShared(
`Checksum of ${cacheOptions.bundleName} matched, Skipped artifact bundling`,
);
bundleCache.copyFiles(
path.join(fedOptions.workspaceRoot, fedOptions.outputPath),
path.resolve(fedOptions.workspaceRoot, fedOptions.outputPath),
);
return cacheMetadata.externals;
}
Expand Down Expand Up @@ -81,7 +81,7 @@ export async function bundleShared(
return { fileName: pi.entryPoint, outName };
});

const fullOutputPath = path.join(
const fullOutputPath = path.resolve(
fedOptions.workspaceRoot,
fedOptions.outputPath,
);
Expand Down Expand Up @@ -174,7 +174,7 @@ export async function bundleShared(
});

bundleCache.copyFiles(
path.join(fedOptions.workspaceRoot, fedOptions.outputPath),
path.resolve(fedOptions.workspaceRoot, fedOptions.outputPath),
);

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function writeFederationInfo(
federationInfo: FederationInfo,
fedOptions: FederationOptions,
) {
const metaDataPath = path.join(
const metaDataPath = path.resolve(
fedOptions.workspaceRoot,
fedOptions.outputPath,
'remoteEntry.json',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function writeImportMap(
}, {});

const importMap = { imports };
const importMapPath = path.join(
const importMapPath = path.resolve(
fedOption.workspaceRoot,
fedOption.outputPath,
'importmap.json',
Expand Down
2 changes: 1 addition & 1 deletion libs/native-federation/src/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const configureDevServer = async (
await federationBuilder.build();

const op = params.options;
const dist = path.join(op.workspaceRoot, op.outputPath);
const dist = path.resolve(op.workspaceRoot, op.outputPath);
server.middlewares.use(serveFromDist(dist, fedInfo));
};

Expand Down
5 changes: 4 additions & 1 deletion libs/native-federation/src/utils/updateIndexHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ export function updateIndexHtml(
fedOptions: FederationOptions,
nfOptions: NfBuilderSchema,
) {
const outputPath = path.join(fedOptions.workspaceRoot, fedOptions.outputPath);
const outputPath = path.resolve(
fedOptions.workspaceRoot,
fedOptions.outputPath,
);
const indexPathCands = [
path.join(outputPath, '../server/index.server.html'),
path.join(outputPath, 'index.html'),
Expand Down
Loading