Skip to content

Commit ec73b72

Browse files
committed
fix(@angular-devkit/build-angular): skip application emit during i18n extraction
The application output files are not needed during an extraction. Previously the files were emitted to a memory file system and discarded. This change removes the processing overhead of emitting the files. It also provides Webpack 5 support due to the internal memory file system no longer being exported. (cherry picked from commit f6d9028)
1 parent 51b4b5e commit ec73b72

File tree

1 file changed

+3
-4
lines changed
  • packages/angular_devkit/build_angular/src/extract-i18n

1 file changed

+3
-4
lines changed

packages/angular_devkit/build_angular/src/extract-i18n/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,9 @@ async function getSerializer(format: Format, sourceLocale: string, basePath: str
6868
}
6969
}
7070

71-
class InMemoryOutputPlugin {
71+
class NoEmitPlugin {
7272
apply(compiler: webpack.Compiler): void {
73-
// tslint:disable-next-line:no-any
74-
compiler.outputFileSystem = new (webpack as any).MemoryOutputFileSystem();
73+
compiler.hooks.shouldEmit.tap('angular-no-emit', () => false);
7574
}
7675
}
7776

@@ -172,7 +171,7 @@ export async function execute(
172171
}
173172

174173
const partials = [
175-
{ plugins: [new InMemoryOutputPlugin()] },
174+
{ plugins: [new NoEmitPlugin()] },
176175
getCommonConfig(wco),
177176
// Only use VE extraction if not using Ivy
178177
getAotConfig(wco, !usingIvy),

0 commit comments

Comments
 (0)