From 1a3f0cc8e6d94008e08e4561b856bf72a7d38f13 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 29 May 2026 16:28:55 +0900 Subject: [PATCH 1/2] chore: update docs link in AGENTS.md --- AGENTS.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 8efc9d4e31..d19082c8bd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -50,7 +50,7 @@ vite-plus/ - **Static `vite.config.ts` extraction**: start at `crates/vite_static_config/README.md` and `packages/cli/src/resolve-vite-config.ts`. - **Bundled toolchain surfaces**: start with `packages/core/BUNDLING.md`, `packages/cli/BUNDLING.md`, and `packages/test/BUNDLING.md`. - **Generated project agent guidance**: `packages/cli/AGENTS.md` and `packages/cli/src/utils/agent.ts`; do not edit these when the task is only to improve root repo guidance. -- **Product/repo docs**: root contributor docs live at the repo root and `docs/`; CLI package docs live under `packages/cli/docs/`; generated agent guidance is separate. +- **Product/repo docs**: root contributor docs live at the repo root and the VitePress site under `docs/` (`docs/guide/`, `docs/config/`); generated agent guidance is separate. - **CLI output behavior**: inspect the relevant code plus `packages/cli/snap-tests/` or `packages/cli/snap-tests-global/`. ## Command and Config Model @@ -79,7 +79,7 @@ Important distinctions: - Do not introduce `vite-task.json`; current Vite+ task configuration lives under `run` in `vite.config.ts`. - Do not run `cargo test -p vite_task` in this repo; Vite Task crates are git dependencies, not local workspace members. -Reference: `packages/cli/docs/guide/run.md` and `packages/cli/docs/config/run.md`. +Reference: `docs/guide/run.md` and `docs/config/run.md`. ## Development Workflow @@ -184,8 +184,8 @@ Use the validation matrix above as the source of truth. For behavior-bearing cha - Root scripts: `package.json` - Repo config: `vite.config.ts` - Vite+ guide: `docs/guide/index.md` -- Run guide: `packages/cli/docs/guide/run.md` -- Run config: `packages/cli/docs/config/run.md` +- Run guide: `docs/guide/run.md` +- Run config: `docs/config/run.md` - CLI package architecture: `packages/cli/BUNDLING.md` - Core package architecture: `packages/core/BUNDLING.md` - Test package architecture: `packages/test/BUNDLING.md` From 93aa70a419dd341fd632a0ad4a5323738094e258 Mon Sep 17 00:00:00 2001 From: Yuji Sugiura Date: Fri, 29 May 2026 16:41:33 +0900 Subject: [PATCH 2/2] docs: update troubleshooting.md --- docs/guide/troubleshooting.md | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md index 7b9ccb7bff..c4d1fc897a 100644 --- a/docs/guide/troubleshooting.md +++ b/docs/guide/troubleshooting.md @@ -25,37 +25,11 @@ The Oxlint type checker path powered by `tsgolint` does not support `baseUrl`. fix before enabling type-aware linting. If that fix fails or is declined, Vite+ skips `typeAware` and `typeCheck`. -## `vp lint` / `vp fmt` may fail to read `vite.config.ts` - -`vp lint`, `vp fmt`, and the Oxc VS Code extension all read the `lint` / `fmt` blocks from `vite.config.ts`. Today that support has important limitations. - -### What is currently supported - -- Static object export: - - `export default { ... }` - - `export default defineConfig({ ... })` - -### What can fail in current integrations - -- Functional or async config: - - `defineConfig((env) => ({ ... }))` - - `defineConfig(async (env) => ({ ... }))` -- Config files that rely on Vite transform/bundling behavior to execute. - -In scenarios reported in issue #930, Oxc-side integrations that read `vite.config.ts` can behave closer to native ESM loading (similar to Vite `--configLoader native`) than Vite's bundled default loader. That means configs depending on bundling/transforms can fail to load for lint/fmt/editor paths. See: https://github.com/voidzero-dev/vite-plus/issues/930 - -### Workarounds - -- Prefer a static `defineConfig({ ... })` export when you need `lint` / `fmt` in `vite.config.ts`. -- Avoid Node-specific globals (`__dirname` in ESM), unresolved TS-only imports, or JSON imports without import attributes in config code used by lint/fmt. -- If needed, keep `.oxlintrc.*` / `.oxfmtrc.*` as temporary fallback, [although we do not recommend doing this normally](/guide/lint##configuration), while this integration behavior is being improved. - -### VS Code multi-root workspace note +## VS Code extension does not read `vite.config.ts` If VS Code has multiple folders open, the shared Oxc language server may pick a different workspace than expected. That can make it look like `vite.config.ts` support is missing. - Confirm the extension is using the intended workspace. -- Confirm the workspace resolves to a recent Oxc/Oxlint/Oxfmt toolchain. ## `vp build` does not run my build script