Skip to content

Commit 683b24c

Browse files
committed
fix(nf): only forward serve port when serving
1 parent f99acc6 commit 683b24c

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

  • libs/native-federation/src/builders/build

libs/native-federation/src/builders/build/builder.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,6 @@ export async function* runBuilder(
117117
return;
118118
}
119119

120-
let options = (await context.validateOptions(
121-
{
122-
...targetOptions,
123-
port: nfOptions.port || targetOptions['port'],
124-
},
125-
builder
126-
)) as JsonObject & ApplicationBuilderOptions;
127-
128120
/**
129121
* Explicitly defined as devServer or if the target contains "serve"
130122
*/
@@ -133,6 +125,16 @@ export async function* runBuilder(
133125
? !!nfOptions.devServer
134126
: target.target.includes('serve');
135127

128+
let options = (await context.validateOptions(
129+
runServer
130+
? {
131+
...targetOptions,
132+
port: nfOptions.port || targetOptions['port'],
133+
}
134+
: targetOptions,
135+
builder
136+
)) as JsonObject & ApplicationBuilderOptions;
137+
136138
let serverOptions = null;
137139

138140
const write = true;

0 commit comments

Comments
 (0)