Skip to content

Conversation

@pushkine
Copy link
Contributor

@pushkine pushkine commented Jan 7, 2021

Copy link
Member

@jasonlyu123 jasonlyu123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. However, we might need a more complex solution on transformation for better sourcemap.

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a bug in combination with $store usage. {@debug $store} is translated to __sveltets_store_get(myfile)}. Notice the missing { at the start. I guess either the remove in debug removes it or the inner store transformation. One way to fix this could be to remove the @debug like it was done before and overwrite only the , inbetween with }{.

@pushkine
Copy link
Contributor Author

pushkine commented Jan 8, 2021

It's related to the MagicString API, I have no idea how to use prepend/append left/right and the docs aren't helping, using prependLeft on both seems to cover the bug you found

@dummdidumm dummdidumm merged commit c8718b3 into sveltejs:master Jan 8, 2021
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 this pull request may close these issues.

3 participants