Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source maps seems to break after version 3.1.0 #176

Closed
raythurnvoid opened this issue Apr 12, 2021 · 4 comments · Fixed by #177
Closed

Source maps seems to break after version 3.1.0 #176

raythurnvoid opened this issue Apr 12, 2021 · 4 comments · Fixed by #177

Comments

@raythurnvoid
Copy link

3.1.0

image

3.0.0 rollback

image

You can check this behavior here: https://github.com/raythurnevoid/svelte-template/tree/svelte-loader-3.1.0
Source maps work for ts files but not for svelte.

Env;

  • webpack: ^5.31.2
  • webpack-dev-server: ^3.11.2
  • typescript: ^4.2.4
  • svelte: ^3.37.0
  • OS: Windows 10
  • Node: 14.16.1 (LTS)
@non25
Copy link
Contributor

non25 commented Apr 12, 2021

This is where things started: #171

Currently I don't understand where issue should be fixed. In svelte core or in svelte-loader.

Here's PR for upstream: sveltejs/svelte#6089

We can fix this as proposed by @rtpt-jonaslieb, but I have no idea how this will impact future svelte versions.

@dummdidumm Thoughts?

@dummdidumm
Copy link
Member

Mhm the upstream PR should only take effect in situations when there's no script tag, but in this case one exists.

@non25
Copy link
Contributor

non25 commented Apr 12, 2021

Can't make things inconvinient in Firefox, tried to throw an error from svelte component.
Jumped to bundled code in console, from there jumped to the original location - component source. Source is there. The line in question is highlighted.

@raythurnevoid Can you try this branch and report if that fixes things for you?

npm i -D non25/svelte-loader#fix-sources-content
# or in yarn
yarn add -D svelte-loader@non25/svelte-loader#fix-sources-content

@raythurnvoid
Copy link
Author

@non25 Works like a charms!
image

You are amazing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants