Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@ngtools/webpack): prevent emitting sourcemaps #4221

Merged
merged 1 commit into from
Feb 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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