Skip to content

Commit 6a0d3d3

Browse files
author
Dayana
committed
remove webpack and use tsc
1 parent 5984985 commit 6a0d3d3

File tree

6 files changed

+32
-59
lines changed

6 files changed

+32
-59
lines changed

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"lint": "ng lint i18n-demo",
1313
"build:client-and-server-bundles-i18n": "ng run i18n-demo:build:production-es && ng run i18n-demo:build:production-en && ng run i18n-demo:server:production",
1414
"build:client-and-server-bundles": "ng build --prod && ng run i18n-demo:server:production",
15-
"build:ssr": "npm run build:client-and-server-bundles && npm run webpack:server",
16-
"build:i18n-ssr": "npm run build:client-and-server-bundles-i18n && npm run webpack:server",
17-
"webpack:server": "webpack --config webpack.server.config.js --progress --colors",
15+
"build:ssr": "npm run build:client-and-server-bundles && npm run compile:server",
16+
"build:i18n-ssr": "npm run build:client-and-server-bundles-i18n && npm run compile:server",
17+
"compile:server": "tsc -p server.tsconfig.json",
1818
"serve:ssr": "node dist/server"
1919
},
2020
"private": true,
@@ -37,14 +37,14 @@
3737
"bootstrap": "^4.1.3",
3838
"core-js": "^2.4.1",
3939
"ionicons": "^4.3.0",
40-
"rxjs": "6.0.0",
40+
"rxjs": "^6.2.2",
4141
"zone.js": "^0.8.26"
4242
},
4343
"devDependencies": {
4444
"@angular-devkit/build-angular": "0.6.0",
4545
"@angular/cli": "6.0.0",
46-
"@angular/compiler-cli": "6.0.0",
47-
"@angular/language-service": "6.0.0",
46+
"@angular/compiler-cli": "^6.0.0",
47+
"@angular/language-service": "^6.0.0",
4848
"@types/node": "^8.0.30",
4949
"codelyzer": "^4.0.2",
5050
"cpy-cli": "^1.0.1",
@@ -54,7 +54,6 @@
5454
"reflect-metadata": "^0.1.10",
5555
"ts-loader": "^4.2.0",
5656
"tslint": "^5.7.0",
57-
"typescript": "~2.7.2",
58-
"webpack-cli": "^2.0.14"
57+
"typescript": "~2.7.2"
5958
}
6059
}

server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ 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+
const {AppServerModuleNgFactory, LAZY_MODULE_MAP} = require('./server/main');
2323

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

server.tsconfig.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"outDir": "./dist",
5+
"sourceMap": true,
6+
"declaration": false,
7+
"moduleResolution": "node",
8+
"emitDecoratorMetadata": true,
9+
"experimentalDecorators": true,
10+
"target": "es5",
11+
"typeRoots": [
12+
"node_modules/@types"
13+
],
14+
"lib": [
15+
"es2017",
16+
"dom"
17+
]
18+
},
19+
"include": ["server.ts"]
20+
}

src/locale/messages.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
</trans-unit>
2626
<trans-unit id="homeTitle" datatype="html">
2727
<source>
28-
Tutorials
29-
</source>
28+
Tutorials
29+
</source>
3030
<context-group purpose="location">
3131
<context context-type="sourcefile">app/tutorials/tutorials.component.html</context>
3232
<context context-type="linenumber">3</context>

static.paths.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export const ROUTES = [
22
'/',
3-
'/about'
3+
'/templates',
4+
'/**'
45
];

webpack.server.config.js

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)