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

fix(esbuild): fix broken source maps #991

Merged
merged 1 commit into from Jun 17, 2022
Merged

fix(esbuild): fix broken source maps #991

merged 1 commit into from Jun 17, 2022

Conversation

silviogutierrez
Copy link
Contributor

Fixes #898

Motivation

Summary

Test plan

@@ -93,18 +102,21 @@ export default function linaria({
const slug = slugify(cssText);
const cssFilename = `${filename}_${slug}.linaria.css`;

let contents = `import ${JSON.stringify(cssFilename)}; ${result.code}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed everything needs to be in one line. Otherwise the maps will be off by 1 line.

I also couldn't figure out what the import statement here achieves. Without it, CSS still worked fine. But I left it there due to https://en.wikipedia.org/wiki/Wikipedia:Chesterton's_fence

Copy link
Collaborator

Choose a reason for hiding this comment

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

I have no idea about the import either :)

@Anber
Copy link
Collaborator

Anber commented Jun 17, 2022

Thank you, @silviogutierrez!

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.

esbuild plugin produces incorrect JSX source maps
2 participants