Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b10b93f

Browse files
committedJan 25, 2019
fix: lazy-ngmodule-hot-loader breaks the sourceMaps
The `lazy-ngmodule-hot-loader` breaks sourceMaps as it does not pass them to the next loaders. This breaks debugging with `--bundle` in VSCode extension as the files included in the `sourcesContent` cannot be mapped correctly to local files.
1 parent a7efcd4 commit b10b93f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎lazy-ngmodule-hot-loader.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ const isLazyLoadedNgModule = resource => {
1010
return issuerContext && issuerContext.endsWith(LAZY_RESOURCE_CONTEXT);
1111
};
1212

13-
module.exports = function (source) {
14-
return isLazyLoadedNgModule(this._module) ?
13+
module.exports = function (source, map) {
14+
const modifiedSource = isLazyLoadedNgModule(this._module) ?
1515
`${source};${HOT_SELF_ACCEPT}`:
1616
source;
17+
18+
this.callback(null, modifiedSource, map);
1719
};

0 commit comments

Comments
 (0)
This repository has been archived.