Skip to content

Commit bbd49f3

Browse files
authored
Merge pull request microsoft#3514 from iclanton/fix-locales-parameter-quirk
[heft] Fix an issue with the --locale parameter.
2 parents f6cf434 + 1331281 commit bbd49f3

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

‎apps/heft/src/stages/BuildStage.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,11 @@ export class BuildStage extends StageBase<BuildStageHooks, IBuildStageProperties
233233
public static getOptionsFromStandardParameters(
234234
standardParameters: IBuildStageStandardParameters
235235
): Omit<IBuildStageOptions, 'watchMode' | 'serveMode'> {
236+
const localesParameterValues: readonly string[] = standardParameters.localesParameter.values;
236237
return {
237238
production: standardParameters.productionFlag.value,
238239
lite: standardParameters.liteFlag.value,
239-
locales: standardParameters.localesParameter.values,
240+
locales: localesParameterValues.length > 0 ? localesParameterValues : undefined,
240241
maxOldSpaceSize: standardParameters.maxOldSpaceSizeParameter.value,
241242
typescriptMaxWriteParallelism: standardParameters.typescriptMaxWriteParallelismParameter.value
242243
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@rushstack/heft",
5+
"comment": "Fix an issue with the `locales` build property. The property is now undefined if no `--locale` parameters are specified.",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@rushstack/heft"
10+
}

0 commit comments

Comments
 (0)