Skip to content

Commit 662709a

Browse files
committed
fix(@ngtools/webpack): support Angular post beta7 compiler
1 parent e59a42d commit 662709a

File tree

5 files changed

+16
-21
lines changed

5 files changed

+16
-21
lines changed

package-lock.json

Lines changed: 6 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@
102102
"zone.js": "^0.8.14"
103103
},
104104
"devDependencies": {
105-
"@angular/compiler": "angular/compiler-builds#5.0.0-beta.7+4586fcc",
106-
"@angular/compiler-cli": "angular/compiler-cli-builds#5.0.0-beta.7+4586fcc",
107-
"@angular/core": "angular/core-builds#5.0.0-beta.7+4586fcc",
105+
"@angular/compiler": "angular/compiler-builds#5.0.0-beta.7+3f100eb",
106+
"@angular/compiler-cli": "angular/compiler-cli-builds#5.0.0-beta.7+3f100eb",
107+
"@angular/core": "angular/core-builds#5.0.0-beta.7+3f100eb",
108108
"@types/chalk": "^0.4.28",
109109
"@types/common-tags": "^1.2.4",
110110
"@types/copy-webpack-plugin": "^4.0.0",

packages/@ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ export class AngularCompilerPlugin implements Tapable {
302302
}
303303

304304
if (this._JitMode) {
305-
306305
// Create the TypeScript program.
307306
time('AngularCompilerPlugin._createOrUpdateProgram.ts.createProgram');
308307
this._program = ts.createProgram(

packages/@ngtools/webpack/src/compiler_host.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,14 @@ export class WebpackCompilerHost implements ts.CompilerHost {
228228
const stats = this._files[fileName];
229229
if (stats == null) {
230230
const content = this.readFile(fileName);
231+
231232
if (!this._cache) {
232233
return ts.createSourceFile(fileName, content, languageVersion, this._setParentNodes);
234+
} else if (!this._files[fileName]) {
235+
// If cache is turned on and the file exists, the readFile call will have populated stats.
236+
// Empty stats at this point mean the file doesn't exist at and so we should return
237+
// undefined.
238+
return undefined;
233239
}
234240
}
235241

tests/e2e/tests/build/script-target.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function () {
1212
// TODO: swap this check for ng5.
1313
if (getGlobalVariable('argv').nightly) {
1414
// Angular 5 has a different folder structure.
15-
knownES6Module = '@angular/core/esm15/index';
15+
knownES6Module = '@angular/core/esm2015/core';
1616
}
1717

1818
return Promise.resolve()

0 commit comments

Comments
 (0)