Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Commit 0c46f95

Browse files
author
Fabian Wiles
committed
clean up config
1 parent ee075b7 commit 0c46f95

File tree

3 files changed

+74
-2
lines changed

3 files changed

+74
-2
lines changed

angular.json

+72
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,78 @@
5353
"src/styles.css"
5454
],
5555
"scripts": []
56+
},
57+
"configurations": {
58+
"production": {
59+
"optimization": true,
60+
"outputHashing": "all",
61+
"sourceMap": false,
62+
"extractCss": true,
63+
"namedChunks": false,
64+
"aot": true,
65+
"extractLicenses": true,
66+
"vendorChunk": false,
67+
"buildOptimizer": true,
68+
"fileReplacements": [
69+
{
70+
"replace": "src/environments/environment.ts",
71+
"with": "src/environments/environment.prod.ts"
72+
}
73+
]
74+
}
75+
}
76+
},
77+
"serve": {
78+
"builder": "@angular-devkit/build-angular:dev-server",
79+
"options": {
80+
"browserTarget": "ng-universal-demo:build"
81+
},
82+
"configurations": {
83+
"production": {
84+
"browserTarget": "ng-universal-demo:build:production"
85+
}
86+
}
87+
},
88+
"extract-i18n": {
89+
"builder": "@angular-devkit/build-angular:extract-i18n",
90+
"options": {
91+
"browserTarget": "ng-universal-demo:build"
92+
}
93+
},
94+
"test": {
95+
"builder": "@angular-devkit/build-angular:karma",
96+
"options": {
97+
"main": "src/test.ts",
98+
"karmaConfig": "./karma.conf.js",
99+
"polyfills": "src/polyfills.ts",
100+
"tsConfig": "src/tsconfig.spec.json",
101+
"scripts": [],
102+
"styles": [
103+
"src/styles.css"
104+
],
105+
"assets": [
106+
{
107+
"glob": "**/*",
108+
"input": "src/assets",
109+
"output": "/assets"
110+
},
111+
{
112+
"glob": "favicon.ico",
113+
"input": "src",
114+
"output": "/"
115+
}
116+
]
117+
}
118+
},
119+
"lint": {
120+
"builder": "@angular-devkit/build-angular:tslint",
121+
"options": {
122+
"tsConfig": [
123+
"src/tsconfig.app.json"
124+
],
125+
"exclude": [
126+
"**/node_modules/**"
127+
]
56128
}
57129
},
58130
"server": {

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"express": "^4.15.2",
5151
"reflect-metadata": "^0.1.10",
5252
"rxjs": "^6.2.2",
53-
"tslib": "^1.9.3",
5453
"zone.js": "^0.8.26"
5554
},
5655
"devDependencies": {

server.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ const PORT = process.env.PORT || 4000;
1919
const DIST_FOLDER = join(process.cwd(), 'dist');
2020

2121
// * NOTE :: leave this as require() since this file is built Dynamically from webpack
22-
const { AppServerModuleNgFactory, LAZY_MODULE_MAP } = require('./dist/server/main');
22+
// NOTE: this will be an error in your console until the universal bundle is built
23+
import { AppServerModuleNgFactory, LAZY_MODULE_MAP } from './dist/server/main';
2324

2425
// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
2526
app.engine('html', ngExpressEngine({

0 commit comments

Comments
 (0)