Skip to content

Commit a2b158b

Browse files
alan-agius4Keen Yee Liau
authored and
Keen Yee Liau
committedApr 2, 2020
feat(@schematics/angular): enable lazy loading on the server for new projects
With this change, lazy-loading on the server becomes enabled out of the box for new projects. This is because webpack will only split ES6 imports into separate chunks. However when using commonjs all lazy loaded paths will be concatenated into the main.js file.
1 parent bd789f5 commit a2b158b

File tree

4 files changed

+0
-5
lines changed

4 files changed

+0
-5
lines changed
 

‎packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": "./<%= tsConfigExtends %>",
33
"compilerOptions": {
44
"outDir": "<%= outDir %>-server",
5-
"module": "commonjs",
65
"types": [
76
"node"
87
]

‎packages/schematics/angular/universal/index_spec.ts

-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ describe('Universal Schematic', () => {
9191
extends: './tsconfig.app.json',
9292
compilerOptions: {
9393
outDir: './out-tsc/app-server',
94-
module: 'commonjs',
9594
types: ['node'],
9695
},
9796
files: [
@@ -116,7 +115,6 @@ describe('Universal Schematic', () => {
116115
extends: './tsconfig.app.json',
117116
compilerOptions: {
118117
outDir: '../../out-tsc/app-server',
119-
module: 'commonjs',
120118
types: ['node'],
121119
},
122120
files: [

‎tests/angular_devkit/build_angular/hello-world-app-ve/src/tsconfig.server.json

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": "./tsconfig.app.json",
33
"compilerOptions": {
44
"outDir": "../dist-server",
5-
"module": "commonjs",
65
"types": []
76
},
87
"files": [

‎tests/angular_devkit/build_angular/hello-world-app/src/tsconfig.server.json

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"compilerOptions": {
44
"outDir": "../dist-server",
55
"baseUrl": "./",
6-
"module": "commonjs",
76
"types": []
87
},
98
"files": [

0 commit comments

Comments
 (0)
Please sign in to comment.