From 4e08b02c87f8e709a40be5ec749a5ceadf3c802d Mon Sep 17 00:00:00 2001 From: Non <19non91@gmail.com> Date: Sat, 22 May 2021 17:05:25 +0300 Subject: [PATCH 1/2] Fix sourcemap breakpoints --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 From 6199bb28346dfb91401ca7d68d89a97e6916f39f Mon Sep 17 00:00:00 2001 From: Non <19non91@gmail.com> Date: Sat, 22 May 2021 17:10:43 +0300 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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