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: use magic-string to create sourcemaps #4

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

danielroe
Copy link
Contributor

related: #1

This uses magic-string to track and create sourcemaps for modified SFCs. (It defaults to disabled unless sourcemap: true is passed to the unplugin.) Bear in mind this can produce higher memory usage, but it is generally worth it.

In addition there are a couple of performance improvements baked in.

  1. In general we have rollup performance benefits by not returning anything from a transform hook if nothing has changed.
  2. We also skip injecting the imports if the component hasn't been added - this should save a bit of time.

@justin-schroeder justin-schroeder merged commit c6a1826 into formkit:main Feb 6, 2024
3 checks passed
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