Skip to content

Commit

Permalink
fix(react): remote url port depends on serve target
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi committed Nov 24, 2023
1 parent 0df8293 commit 0450fb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function setupSsrForRemote(
const serverOutputPath =
serverOptions?.outputPath ??
joinPathFragments(originalOutputPath, 'server');
const serverOutputName = serverOptions?.outputName ?? 'main.js';
const serverOutputName = serverOptions?.outputFileName ?? 'main.js';
project.targets['serve-static'] = {
dependsOn: ['build', 'server'],
executor: 'nx:run-commands',
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/module-federation/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { readCachedProjectConfiguration } from 'nx/src/project-graph/project-graph';

export function getFunctionDeterminateRemoteUrl(isServer: boolean = false) {
const target = isServer ? 'serve-server' : 'serve';
const target = 'serve';
const remoteEntry = isServer ? 'server/remoteEntry.js' : 'remoteEntry.js';

return function (remote: string) {
Expand Down

0 comments on commit 0450fb9

Please sign in to comment.