Skip to content

Commit

Permalink
fix: Match webpack sourcemap relative paths
Browse files Browse the repository at this point in the history
Adjust source path to match the way webpack generates sourcemaps
for js. This makes css and js sources appear in the same directory
when using sourcemaps in chrome.

Fixes #1218.
  • Loading branch information
isaacl committed Nov 4, 2020
1 parent 1351e3a commit 2a41281
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/utils.js
Expand Up @@ -484,7 +484,7 @@ function normalizeSourceMapForRuntime(map, loaderContext) {
path.relative(loaderContext.rootContext, absoluteSource)
);

return `webpack://${contextifyPath}`;
return `webpack://./${contextifyPath}`;
});
}

Expand Down

0 comments on commit 2a41281

Please sign in to comment.