Skip to content

Commit 3c4d66d

Browse files
authored
Fix sourcemap breakpoints (#183)
1 parent 9b9500a commit 3c4d66d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# svelte-loader changelog
22

3-
## Unreleased
3+
## 3.1.2 (Unreleased)
44

55
* Update to latest `svelte-hmr` package fixing Webpack 4 support
6+
* Fix sourcemap breakpoints ([#183](https://github.com/sveltejs/svelte-loader/pull/183))
67

78
## 3.1.1
89

index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ module.exports = function(source, map) {
5050
const compiled = compile(processed.toString(), compileOptions);
5151
let { js, css, warnings } = compiled;
5252

53-
if (!js.map.sourcesContent) js.map.sourcesContent = [ source ];
53+
if (!js.map.sourcesContent) {
54+
js.map.sourcesContent = [source];
55+
js.map.sources = [compileOptions.filename];
56+
}
5457

5558
warnings.forEach(
5659
options.onwarn

0 commit comments

Comments
 (0)