You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Load vite.config.ts from Oxlint|Oxfmt LSP creates a stray .svelte-kit folder at the monorepo root #1756
@fengmk2 The issue seems to be that the LSP wrappers only set VP_VERSION, but lazyPlugins() relies on VP_COMMAND to skip framework plugins for lint/fmt. What do you think about setting VP_COMMAND ??= 'lint' in bin/oxlint and VP_COMMAND ??= 'fmt' in bin/oxfmt? This would match the normal vp lint/vp fmt resolver path and avoid executing SvelteKit while OXC loads vite.config.ts.
Activity
fengmk2 commentedon Jun 4, 2026
In
vpCLI, we can uselazyPluginsto solve this kind of issue:@jong-kyung improved them in PR #1752. After the next version is released, the
vp create / migratecommands will handle them by default.So I think it is necessary to extend
lazyPluginsto support environment checks for oxlint/oxfmt CLI execution.leaysgur commentedon Jun 4, 2026
I see.
So, in terms of the answer for the user, it's something like:
lazyPlugins()in thevite.config.tsfor nowvp create|migratewill handle this automaticallyIs that about right?
fengmk2 commentedon Jun 4, 2026
@leaysgur yes
OrientusPrime commentedon Jun 4, 2026
By the way, I was already using sveltekit by wrapping it with lazyPlugin(). It wasn't solving the problem, at least for me. Just so you know.
fengmk2 commentedon Jun 4, 2026
@OrientusPrime Can you provide a repository that reproduces the issue?
jong-kyung commentedon Jun 4, 2026
I created a minimal reproduction repo: https://github.com/jong-kyung/repro-vite-plus-1756
To reproduce:
Developer: Reload Window.After the reload, the issue is reproduced:
.svelte-kitis created both at the repository root and underapps/web.cc. @leaysgur @fengmk2
jong-kyung commentedon Jun 4, 2026
@fengmk2 The issue seems to be that the LSP wrappers only set
VP_VERSION, butlazyPlugins()relies onVP_COMMANDto skip framework plugins for lint/fmt. What do you think about settingVP_COMMAND ??= 'lint'inbin/oxlintandVP_COMMAND ??= 'fmt'inbin/oxfmt? This would match the normal vp lint/vp fmt resolver path and avoid executing SvelteKit while OXC loadsvite.config.ts.fengmk2 commentedon Jun 4, 2026
@jong-kyung It looks like something was missed. Can you fix it?
jong-kyung commentedon Jun 4, 2026
@fengmk2 Sure, I’ll take this and open a PR.
fix(cli): set VP_COMMAND in oxlint/oxfmt LSP wrappers (#1764)