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

fix: lazy-ngmodule-hot-loader breaks the sourceMaps #770

Merged
merged 1 commit into from
Jan 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lazy-ngmodule-hot-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ const isLazyLoadedNgModule = resource => {
return issuerContext && issuerContext.endsWith(LAZY_RESOURCE_CONTEXT);
};

module.exports = function (source) {
return isLazyLoadedNgModule(this._module) ?
`${source};${HMR_HANDLER}` :
module.exports = function (source, map) {
const modifiedSource = isLazyLoadedNgModule(this._module) ?
`${source};${HMR_HANDLER}`:
source;

this.callback(null, modifiedSource, map);
};