Skip to content

Commit

Permalink
fix(@ngtools/webpack): skip null files (angular#4168)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipesilva authored and MRHarrison committed Feb 9, 2017
1 parent ffb42ed commit 5289dd8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/@ngtools/webpack/src/compiler_host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,12 @@ export class WebpackCompilerHost implements ts.CompilerHost {
const isWindows = process.platform.startsWith('win');
for (const fileName of Object.keys(this._files)) {
const stats = this._files[fileName];
// If we're on windows, we need to populate with the proper path separator.
const path = isWindows ? fileName.replace(/\//g, '\\') : fileName;
fs._statStorage.data[path] = [null, stats];
fs._readFileStorage.data[path] = [null, stats.content];
if (stats) {
// If we're on windows, we need to populate with the proper path separator.
const path = isWindows ? fileName.replace(/\//g, '\\') : fileName;
fs._statStorage.data[path] = [null, stats];
fs._readFileStorage.data[path] = [null, stats.content];
}
}
for (const dirName of Object.keys(this._directories)) {
const stats = this._directories[dirName];
Expand Down

0 comments on commit 5289dd8

Please sign in to comment.