diff --git a/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template b/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template index e960e9a8f385..06b8b6ee92dc 100644 --- a/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template +++ b/packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template @@ -2,7 +2,10 @@ "extends": "./<%= tsConfigExtends %>", "compilerOptions": { "outDir": "<%= outDir %>-server", - "module": "commonjs" + "module": "commonjs", + "types": [ + "node" + ] }, "files": [ "src/<%= stripTsExtension(main) %>.ts" diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index f2132888c7bf..d58a8edbcf7e 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -91,6 +91,7 @@ describe('Universal Schematic', () => { compilerOptions: { outDir: './out-tsc/app-server', module: 'commonjs', + types: ['node'], }, files: [ 'src/main.server.ts', @@ -115,6 +116,7 @@ describe('Universal Schematic', () => { compilerOptions: { outDir: '../../out-tsc/app-server', module: 'commonjs', + types: ['node'], }, files: [ 'src/main.server.ts',