diff --git a/CHANGELOG.md b/CHANGELOG.md index 830b0ae7..188d4365 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # svelte-loader changelog -## Unreleased +## 3.1.2 (Unreleased) * Update to latest `svelte-hmr` package fixing Webpack 4 support +* Fix sourcemap breakpoints ([#183](https://github.com/sveltejs/svelte-loader/pull/183)) ## 3.1.1 diff --git a/index.js b/index.js index 430ac541..2a4ddd4d 100644 --- a/index.js +++ b/index.js @@ -50,7 +50,10 @@ module.exports = function(source, map) { const compiled = compile(processed.toString(), compileOptions); let { js, css, warnings } = compiled; - if (!js.map.sourcesContent) js.map.sourcesContent = [ source ]; + if (!js.map.sourcesContent) { + js.map.sourcesContent = [source]; + js.map.sources = [compileOptions.filename]; + } warnings.forEach( options.onwarn