Skip to content

Commit dcb0148

Browse files
committed
fix(angular-rspack): delete build outputPath only once
1 parent c156394 commit dcb0148

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

packages/angular-rspack/src/lib/config/config-utils/common-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export async function getCommonConfig(
6363
output: {
6464
uniqueName: normalizedOptions.projectName ?? 'rspack-angular',
6565
publicPath: normalizedOptions.deployUrl ?? '',
66-
clean: normalizedOptions.deleteOutputPath,
66+
clean: false, // already taken care for by AngularRspackPlugin
6767
crossOriginLoading,
6868
trustedTypes: { policyName: 'angular#bundler' },
6969
sourceMapFilename: normalizedOptions.sourceMap.scripts

packages/angular-rspack/src/lib/config/create-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export async function _createConfig(
5151
);
5252
const hashFormat = getOutputHashFormat(normalizedOptions.outputHashing);
5353

54-
if (options.deleteOutputPath) {
54+
if (normalizedOptions.deleteOutputPath) {
5555
await deleteOutputDir(
5656
normalizedOptions.root,
5757
normalizedOptions.outputPath.base

packages/angular-rspack/src/lib/config/create-config.unit.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ describe('createConfig', () => {
2121
scripts: [],
2222
aot: true,
2323
skipTypeChecking: false,
24+
deleteOutputPath: false,
2425
};
2526

2627
beforeEach(() => {

0 commit comments

Comments
 (0)