Skip to content

fix destructuring errors in esbuild example in preprocessing.md #319

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

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

SpicyRicecaker
Copy link
Contributor

In the preprocessing.md doc there seems to be a destructuring error.

const { js: code } //... js doesn't exist
return { code };

Using the code above makes it so that the compiler throws errors. The latest esbuild transform api doesn't return an object with the js property but instead has the code property.

The small changes below fixes the error and actually mirrors some of the code in the custom preprocessors section slightly above the esbuild example.

const { code, map } = //...

@SpicyRicecaker SpicyRicecaker changed the title fixes destructuring errors in example in preprocessing.md fix destructuring errors in esbuild example in preprocessing.md Mar 2, 2021
Copy link
Member

@kaisermann kaisermann left a comment

Choose a reason for hiding this comment

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

Nice! Thanks 🙏

@kaisermann kaisermann merged commit af3df3a into sveltejs:main Mar 2, 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.

2 participants