Skip to content

chore: convert preprocessor to vite plugin #13617

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 2 commits into from
May 1, 2025
Merged

Conversation

benmccann
Copy link
Member

@benmccann benmccann commented Mar 20, 2025

closes sveltejs/language-tools#2321

This is a breaking change as it adds a peer dependency on vite-plugin-svelte for resolving the Svelte config file

This changes the implementation from a preprocessor to a plugin with enforce: 'pre' to help vite-plugin-svelte kill off it's preprocessing API. The code change looks pretty big as a result of the file rename, but it's not actually a huge change

I'm removing the warning from the docs about the plugin being unstable as I don't anticipate major API changes now that we've decided against renaming this to something like <img data-enhanced />, etc.

Copy link

changeset-bot bot commented Mar 20, 2025

🦋 Changeset detected

Latest commit: a056cf7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/enhanced-img Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@svelte-docs-bot
Copy link

@benmccann benmccann force-pushed the enhancedimg-rm-preprocessor branch 2 times, most recently from 2c852b1 to c306ecf Compare March 20, 2025 21:46
@benmccann benmccann force-pushed the enhancedimg-rm-preprocessor branch from c306ecf to 9dfac09 Compare March 20, 2025 21:50
@benmccann benmccann force-pushed the enhancedimg-rm-preprocessor branch from 9dfac09 to a056cf7 Compare March 20, 2025 21:55
@benmccann benmccann requested a review from dominikg April 16, 2025 14:17
@benmccann benmccann merged commit 943beed into main May 1, 2025
18 checks passed
@benmccann benmccann deleted the enhancedimg-rm-preprocessor branch May 1, 2025 12:46
@github-actions github-actions bot mentioned this pull request May 1, 2025
@GauBen
Copy link
Contributor

GauBen commented May 29, 2025

Hi! Unfortunately this PR broke the compatibility with mdsvex: #13842

From what I understand, the "future-proof" fix would be to make mdsvex a Vite/Rollup plugin rather than a Svelte preprocessor, right? I may give it a try if time allows

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

Successfully merging this pull request may close these issues.

enhanced:img tag not recognised as img
2 participants