Skip to content

Commit

Permalink
fix(@ngtools/webpack): prevent emitting of sourcemaps
Browse files Browse the repository at this point in the history
In some cases compilation of a component style generates a sourcemap and it's not deleted from assets.
This would be cause hangup in Windows.
  • Loading branch information
dobbydog committed Feb 1, 2017
1 parent 916e9bd commit 3c41bcd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/@ngtools/webpack/src/resource_loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ export class WebpackResourceLoader implements ResourceLoader {
});

// Restore the parent compilation to the state like it was before the child compilation.
this._parentCompilation.assets[outputName] = assetsBeforeCompilation[outputName];
if (assetsBeforeCompilation[outputName] === undefined) {
// If it wasn't there - delete it.
delete this._parentCompilation.assets[outputName];
}
Object.keys(childCompilation.assets).forEach((fileName) => {
this._parentCompilation.assets[fileName] = assetsBeforeCompilation[fileName];
if (assetsBeforeCompilation[fileName] === undefined) {
// If it wasn't there - delete it.
delete this._parentCompilation.assets[fileName];
}
});

resolve({
// Hash of the template entry point.
Expand Down

0 comments on commit 3c41bcd

Please sign in to comment.