Skip to content

Feat(add): vite.addPlugin() #633

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

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

jycouet
Copy link
Contributor

@jycouet jycouet commented Jul 15, 2025

fix #632


I just created a helper.ts & some tests, but it should probably move to another location ?
Maybe addInArrayOfObject & exportDefaultConfig could go in common ?
And addPluginToViteConfig is maybe a bit higher level ? Or it could go to common as well ?

I did the demo on devtool plugin, and the API looks nice! no ? @benmccann @manuel3108 let me know what do you think.

Copy link

changeset-bot bot commented Jul 15, 2025

🦋 Changeset detected

Latest commit: 13c7c1e

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

This PR includes changesets to release 1 package
Name Type
sv Patch

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

Copy link

pkg-pr-new bot commented Jul 15, 2025

Open in StackBlitz

npx https://pkg.pr.new/sveltejs/cli/sv@633
npx https://pkg.pr.new/sveltejs/cli/svelte-migrate@633

commit: 533e562

Copy link
Member

@manuel3108 manuel3108 left a comment

Choose a reason for hiding this comment

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

What's the purpose behind this change? As far as I'm aware we are currently only using this in one place (devtools-json) and the current code is smaller and better readable and understandable in my opinion.

But maybe I'm missing what you are trying to achieve here.

@manuel3108
Copy link
Member

Ignore my last comment, just found the issue. let me check then

Copy link
Member

@manuel3108 manuel3108 left a comment

Choose a reason for hiding this comment

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

Overall this looks good and I understand the changes now. As for the file location, maybe we could do something like /tooling/js/vite as we already have /tooling/js/kit as well. Not a huge fan of this, but I think it would be better understandable than what we have right now.

@jycouet
Copy link
Contributor Author

jycouet commented Jul 18, 2025

haha, perfect 👍
I'll proceed, clean up & co and will go out of "draft" when ready to review.

@jycouet
Copy link
Contributor Author

jycouet commented Jul 18, 2025

Kinda beautiful 🫠

image

@jycouet jycouet marked this pull request as ready for review July 18, 2025 19:19
@jycouet jycouet requested a review from manuel3108 July 18, 2025 19:19
@jycouet jycouet changed the title Add Util: addPluginToViteConfig Feat(add): vite.addPlugin() Jul 18, 2025
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.

Unable to process vite.config.ts while installing tailwindcss
2 participants