Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Fix double build when using ng serve (#4805)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwmac committed Nov 26, 2020
1 parent ac08975 commit 3e3aa7c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/frontend/packages/devkit/src/build/extensions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as fs from 'fs';
import * as path from 'path';
import { NormalModuleReplacementPlugin } from 'webpack';
import { NormalModuleReplacementPlugin, WatchIgnorePlugin } from 'webpack';

import { StratosConfig } from '../lib/stratos.config';

Expand Down Expand Up @@ -63,6 +63,10 @@ export class ExtensionsHandler {
regex = importModuleRegex;
}

// Ignore changed in the overrides file - otherwise with ng serve we will build twice
// The user needs to restart `ng serve` anyway if new extensions are added
webpackConfig.plugins.push(new WatchIgnorePlugin([overrideFile]));

webpackConfig.plugins.push(new NormalModuleReplacementPlugin(
regex,
overrideFile
Expand Down

0 comments on commit 3e3aa7c

Please sign in to comment.