Skip to content

fix(create): drop src-only tsconfig include#1863

Open
leno23 wants to merge 4 commits into
voidzero-dev:mainfrom
leno23:codex/remove-template-tsconfig-include-1308
Open

fix(create): drop src-only tsconfig include#1863
leno23 wants to merge 4 commits into
voidzero-dev:mainfrom
leno23:codex/remove-template-tsconfig-include-1308

Conversation

@leno23

@leno23 leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove generated tsconfig.json include: ["src"] when Vite+ creates builtin application/library projects
  • apply the same cleanup to the default app/library created by vite:monorepo
  • add unit coverage for the src-only include cleanup helper

Closes #1308

Verification

  • git diff --check
  • pnpm exec oxnode tmp/check-remove-src-include.ts (temporary smoke script; removed before commit)

Notes

I could not run pnpm -F vite-plus test src/create/__tests__/utils.spec.ts in this checkout because local workspace dependencies are not built: Vitest resolves the local Vite package and fails on missing vite/dist/vite/node/index.js; trying pnpm -F vite build then fails on missing local rolldown/packages/rolldown/dist/cli.mjs.

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 274b7b9
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a33996b18edab00086dd44f

@leno23 leno23 marked this pull request as ready for review June 18, 2026 04:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4583b46e89

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/create/utils.ts Outdated
@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Updated the branch to parse scaffolded tsconfig.json with the existing JSONC parser before removing the default src-only include, and added a regression test for comments/trailing commas.\n\nLocal checks:\n- git diff --check\n- pnpm exec oxfmt --check packages/cli/src/utils/json.ts packages/cli/src/create/utils.ts packages/cli/src/create/tests/utils.spec.ts\n- pnpm exec oxlint packages/cli/src/utils/json.ts packages/cli/src/create/utils.ts packages/cli/src/create/tests/utils.spec.ts\n- pnpm exec tsc -p packages/cli/tsconfig.json --noEmit\n\nNote: the focused Vitest command still cannot start in this local checkout because Vitest resolves a missing local vite/dist/vite/node/index.js module after pnpm install.

@fengmk2 fengmk2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you add a snap test that can reproduce the issue? Also, please make sure CI passes before setting the PR to ready for review status.

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Pushed a follow-up formatting fix for the vp check failures in packages/cli/src/create/tests/utils.spec.ts, packages/cli/src/create/utils.ts, and packages/cli/src/utils/json.ts. I reproduced the formatter with the root fmt config via oxfmt 0.55.0; targeted oxfmt --check and git diff --check pass locally. The local vp binary itself still cannot run until the CLI package dist is rebuilt.

@leno23

leno23 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Added the requested snap coverage in 274b7b9: the global new-create-vite snap test now verifies the generated default application tsconfig.json no longer keeps the src-only include.\n\nLocal validation:\n- node -e parse check for packages/cli/snap-tests-global/new-create-vite/steps.json\n- git diff --check\n\nI also attempted the focused snap test, but this local checkout cannot build/run global snap tests because packages/cli/dist is absent and pnpm -F vite-plus build-ts currently fails resolving rolldown/dist/index.mjs from the local pnpm install. CI should now validate the snap job.

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.

Remove "include": ["src"] from tsconfig.json in vp create vite:library template

2 participants