Repository navigation
Description
Currently, vp lint, vp fmt, and the VSCode extension all transparently utilize Oxlint and Oxfmt respectively.
In Oxapps side, the ability to extract .lint and .fmt fields from vite.config.ts has been added, but they are not fully complete at present.
1: All Vite config patterns are not supported
Note
This is fixed in oxlint@1.67.0 and oxfmt@0.52.0 = vite-plus@0.1.23
Details
Currently supported static config only:
export default { ... };
export default defineConfig({ ... });Conditional and async config are NOT supported.
defineConfig(({ ... }) => ({ ... }));
defineConfig(async ({ ... }) => ({ ... }));Since they do not know how to handle arguments.
For the first place, Oxlint and Oxfmt do not support functional config even with their oxlint.config.ts. Also, be aware that the file name, they only support the .ts extension.
2: Some valid Vite config fails to load even with static config
Note
This is fixed in oxlint@1.67.0 and oxfmt@0.52.0 = vite-plus@0.1.23
Details
Most reported cases fall into this category.
Oxlint and Oxfmt uses normal ESM dynamic import() to load vite.config.ts.
This means it is roughly equivalent to --configLoader native for Vite, so if configuration files rely on the default --configLoader bundle (also runner), which requires some transform, it will fail to load.
e.g.
- Use
__dirnameintype: moduleproject - Try to
import X from "./foo.js", but actually there is onlyfoo.tson the disk - Try to
import "foo.jsonwithoutwith { type: "json" } - etc...
Refs: vitejs/vite#21546
3: VSCode extension does not pick vite.config.ts
Details
If you have multiple workspaces open, please make sure that the correct version of Oxlint/Oxfmt is being used to your dedicated workspace.
Currently, single extension and LSP process is shared across multiple workspace folders.
If an unintended project's LSP is selected, it may not have the capability to read vite.config.ts.
4: vite.config.ts is not used if oxapps config file also exists
Note
This is fixed in oxlint@1.60.0 and oxfmt@0.45.0
Details
With current implementation, vite.config.ts is used as fallback.
The priority order is: the respective config files (such as .oxfmtrc.json) and then vite.config.ts.
I don't think it's recommended to combine these together in a Vite+ environment, but that’s how things stand at the moment.
5: Oxlint|Oxfmt fails even in non-Vite+ project
Note
This is fixed in oxlint@1.60.0 and oxfmt@0.45.0
Details
It's not directly related to Vite+, but it's a noteworthy point.
Oxlint and Oxfmt might run into problems if they find vite.config.ts (which triggers 2nd issue) while searching for config files by finding-up the parent directories. Just by attempting to load the relevant .lint|fmt field causes error.
This may happen to Oxfmt CLI+LSP, and Oxlint LSP usecases.
6: Nested config is not used by the vp lint|fmt, but it is used by the LSP
Details
Currently, vp lint|fmt always executes with --config flag with the vite.config.ts located at the project root.
This is because, as a recommendation for Vite+, we want to keep all lint|fmt settings contained within the root. (And use overrides for each package style)
However, it is not possible to enforce the same specification for an LSP (since it is unknown which directory the workspace will be opened from).
Therefore, if nested vite.config.ts files are placed and they contain .lint|fmt fields, different options will be used.
We are considering adding a built-in Oxlint rule to detect and prevent this.
Refs: #1456
(Ideally, --config is not needed for vp lint|fmt. It will auto-discover root config at any cwd. But perf-wise, since -c effectively disables nested config discovery. Or just adding --disable-nested-config is fine too. But still, LSP does not have equivalent option yet.)
Activity
vp lintdoes not detectlintfield invite.config.ts#1084 as a duplicate of this issueRafaRochaS91 commentedon Mar 25, 2026
+1 here, I've just used the
vp createinteractive command to create a monorepo and the format IDE shortcut doesn't pickup the configuration of fmt as below:I'm using cursor so the specific extension pack isn't available however i do have the extensions within installed (vitest and oxc).
I tried in VSCode and had the same issue where the format shortcut and the
cmd + shift + pisn't picking up the config invite.config.ts.Let me know if there's any more information to provide.
FleetAdmiralJakob commentedon Apr 4, 2026
+1 from me as well. I need to access
modetoday, so I switched to the function/conditional config. This brokevp fmtthough.FleetAdmiralJakob commentedon Apr 4, 2026
The 4th "issue" you wrote down is actually what helps me to move around the first problem. By just removing the
lintandfmtfield from thevite.config.tsand moving the configs to their respective JSON files, I was able to work around the problem (not the smoothest way, but hey, at least something)4513ECHO commentedon Apr 9, 2026
For someone trying to use conditional config, I've found following example will be useful:
You can access
modeby adding a simple plugin.fengmk2 commentedon Apr 24, 2026
@4513ECHO https://viteplus.dev/guide/troubleshooting#slow-config-loading-caused-by-heavy-plugins can use
lazyPluginsnow.4513ECHO commentedon Apr 24, 2026
I think
lazyPluginsdoesn't fit this situation. In my example the plugin accessesmodebut does no heavy calculations.[-]vp lint/fmt + IDE: Known vite.config.ts releated issues[/-][+]lint,fmt: Known vite.config.ts releated issues[/+]docs: update troubleshooting.md (#1708)
fix: temporarely use `redhat.vscode-yaml` as yaml formatter due to ox…
fix: temporarely use `redhat.vscode-yaml` as yaml formatter due to ox…
priithansen commentedon Jun 19, 2026
For me moving
fmtandlintobjects to correspondingoxfmt.config.tsandoxlint.config.tsfiles pointing the Oxc extension to those and importing the config files invite.config.tsseems like pragmatical solution. Avoiding problems where the extension can't handle the full vite config object while keeping the rules deduplicated.