Skip to content

Commit 4c33e8b

Browse files
committed
build: migrate aot compilation to angular 5
1 parent 9c395df commit 4c33e8b

File tree

5 files changed

+8
-19
lines changed

5 files changed

+8
-19
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
node_modules/
77
coverage/
88
dist/
9-
aot/
109
tmp/
1110

1211
# error

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"typings": "index.d.ts",
2626
"scripts": {
2727
"all": "run-s fix clean build e2e.update e2e",
28-
"clean": "rimraf aot coverage dist tmp",
28+
"clean": "rimraf coverage dist tmp",
2929
"prefix": "prettier --write --single-quote --trailing-comma all 'src/**/*.{ts,js}' 'e2e/src/**/*.{ts,js}' '*.{ts,js}'",
3030
"fix": "tslint --fix --project tsconfig.json 'src/**/*.ts' 'e2e/src/**/*.ts' '*.ts'",
3131
"prelint": "prettier -l --single-quote --trailing-comma all 'src/**/*.{ts,js}' 'e2e/src/**/*.{ts,js}' '*.{ts,js}'",

tsconfig.json

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,6 @@
1414
"sourceMap": true,
1515
"outDir": "tmp"
1616
},
17-
"include": [
18-
"**/*.ts"
19-
],
20-
"exclude": [
21-
"aot",
22-
"dist",
23-
"node_modules",
24-
"tmp"
25-
],
26-
"angularCompilerOptions": {
27-
"skipMetadataEmit": false,
28-
"skipTemplateCodegen": true
29-
}
17+
"include": ["**/*.ts"],
18+
"exclude": ["dist", "node_modules", "tmp"]
3019
}

tsconfig.prod.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"include": [],
88
"files": ["src/index.ts"],
99
"angularCompilerOptions": {
10-
"genDir": "aot"
10+
"skipMetadataEmit": false,
11+
"skipTemplateCodegen": true
1112
}
1213
}

webpack.config.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const path = require('path');
55
const resolvePath = path.resolve.bind(path, __dirname);
66

77
const HtmlWebpackPlugin = require('html-webpack-plugin');
8-
const { AotPlugin } = require('@ngtools/webpack');
8+
const { AngularCompilerPlugin } = require('@ngtools/webpack');
99

1010
const config: webpack.Configuration = {
1111
context: resolvePath(),
@@ -21,7 +21,7 @@ const config: webpack.Configuration = {
2121
new HtmlWebpackPlugin({
2222
template: resolvePath('e2e/src/index.html'),
2323
}),
24-
new AotPlugin({
24+
new AngularCompilerPlugin({
2525
tsConfigPath: resolvePath('tsconfig.json'),
2626
mainPath: resolvePath('e2e/src/e2e-main.ts'),
2727
}),
@@ -34,7 +34,7 @@ const config: webpack.Configuration = {
3434
module: {
3535
rules: [
3636
{
37-
test: /\.ts$/,
37+
test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/,
3838
loader: '@ngtools/webpack',
3939
},
4040
],

0 commit comments

Comments
 (0)