Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 5ab0466

Browse files
fix: lazy-ngmodule-hot-loader breaks the sourceMaps (#772)
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 5ab0466

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: lazy-ngmodule-hot-loader.js

+4-2
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)