Skip to content

Make Vite plugin compatible with Vite < 7 (TypeScript-wise)#542

Merged
yamcodes merged 12 commits into
mainfrom
533-not-compatible-with-vite-6-typescript-wise
Dec 12, 2025
Merged

Make Vite plugin compatible with Vite < 7 (TypeScript-wise)#542
yamcodes merged 12 commits into
mainfrom
533-not-compatible-with-vite-6-typescript-wise

Conversation

@yamcodes

@yamcodes yamcodes commented Dec 12, 2025

Copy link
Copy Markdown
Owner

Closes #533

Summary by CodeRabbit

  • New Features

    • Added a new Vite-legacy playground environment with React, TypeScript, and modern development tooling.
    • Integrated environment variable management with validation support.
  • Documentation

    • Added setup and configuration guides for the new playground environment.
  • Chores

    • Updated workspace and project configurations.

✏️ Tip: You can customize this high-level summary in your review settings.

@yamcodes yamcodes linked an issue Dec 12, 2025 that may be closed by this pull request
@changeset-bot

changeset-bot Bot commented Dec 12, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b323b82

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Dec 12, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
arkenv Skipped Skipped Dec 12, 2025 1:15pm

@coderabbitai

coderabbitai Bot commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@yamcodes has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 22 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 8f52a70 and b323b82.

📒 Files selected for processing (4)
  • apps/playgrounds/vite-legacy/.env.development (1 hunks)
  • apps/playgrounds/vite-legacy/.env.production (1 hunks)
  • apps/playgrounds/vite-legacy/README.md (1 hunks)
  • apps/playgrounds/vite-legacy/src/app.tsx (1 hunks)

Walkthrough

A new Vite legacy React+TypeScript playground is added under apps/playgrounds/vite-legacy/ with full configuration, including environment schema integration via the arkenv Vite plugin. The vite-plugin package is updated with external dependency declarations, and an outdated ESLint config is removed.

Changes

Cohort / File(s) Change Summary
New Vite Legacy Playground
apps/playgrounds/vite-legacy/.gitignore, apps/playgrounds/vite-legacy/README.md, apps/playgrounds/vite-legacy/index.html, apps/playgrounds/vite-legacy/package.json, apps/playgrounds/vite-legacy/src/{app.css, app.tsx, index.css, main.tsx}, apps/playgrounds/vite-legacy/tsconfig*.json, apps/playgrounds/vite-legacy/vite.config.ts
Complete React+TypeScript+Vite playground setup with gitignore patterns, documentation, HTML entry point, React component with counter, global and component CSS, TypeScript configurations (app, node, project references), and Vite config with arkenv environment schema (PORT, VITE_MY_VAR, VITE_MY_NUMBER, VITE_MY_BOOLEAN) and plugin integration.
Vite Plugin Configuration Update
packages/vite-plugin/tsdown.config.ts
Adds "vite" to external dependencies in tsdown configuration.
Vite Plugin Metadata
packages/vite-plugin/src/index.ts
Adds single-line comment above InferType type alias.
Removed ESLint Config
apps/playgrounds/vite/eslint.config.js
Deletes ESLint configuration module (previously exported tseslint.config for TypeScript/React files).
Workspace Update
arkenv.code-workspace
Adds new "vite-legacy-playground" folder entry to workspace folders array.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • vite.config.ts: Review Env schema definition, arkEnv integration, and port/variable parsing logic for correctness.
  • TypeScript configurations: Verify tsconfig inheritance and references are properly structured for the project.
  • package.json: Confirm dependency versions and workspace references align with project standards.
  • tsdown.config.ts: Ensure "vite" external declaration doesn't unintentionally exclude necessary bundling.

Possibly related PRs

Poem

🐰 A Vite legacy garden grows with care,
Env types flourish in the springtime air,
React and TypeScript hop hand in hand,
Arkenv config blooms across the land! 🌱✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR addresses issue #533 by adding a new vite-legacy playground and updating the vite-plugin configuration, but lacks explicit TypeScript type fixes for the hotUpdate hook incompatibility. Add explicit type fixes to the vite-plugin to resolve hotUpdate hook signature incompatibilities between Vite 6 and 7, such as using conditional types or adding proper type declarations.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Out of Scope Changes check ❓ Inconclusive Most changes are focused on creating a new vite-legacy playground and workspace configuration, but the core TypeScript type compatibility fix for the vite-plugin is minimally addressed. Clarify whether the vite-legacy playground serves as a testing ground for the type compatibility or if it's a separate example project, and ensure primary vite-plugin type fixes are included.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective of making the Vite plugin compatible with Vite < 7 TypeScript-wise, which aligns with the PR's core purpose.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added docs Adds or changes documentation, or acts as documentation in and of itself example Issues or Pull Requests concerning at least one ArkEnv example. (Found in the `examples/` directory) labels Dec 12, 2025
@yamcodes yamcodes changed the title Make Vite plugin compatible with Vite 6 Make Vite plugin compatible with Vite 6 (TypeScript-wise) Dec 12, 2025
@github-actions github-actions Bot added the @arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv label Dec 12, 2025
@yamcodes yamcodes changed the title Make Vite plugin compatible with Vite 6 (TypeScript-wise) Make Vite plugin compatible with Vite < 7 (TypeScript-wise) Dec 12, 2025
@github-actions github-actions Bot removed the example Issues or Pull Requests concerning at least one ArkEnv example. (Found in the `examples/` directory) label Dec 12, 2025
@github-actions github-actions Bot added the example Issues or Pull Requests concerning at least one ArkEnv example. (Found in the `examples/` directory) label Dec 12, 2025
@yamcodes
yamcodes marked this pull request as ready for review December 12, 2025 12:59
@pkg-pr-new

pkg-pr-new Bot commented Dec 12, 2025

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/arkenv@542
npm i https://pkg.pr.new/@arkenv/bun-plugin@542
npm i https://pkg.pr.new/@arkenv/vite-plugin@542

commit: b323b82

@arkenv-bot

arkenv-bot Bot commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Package Size Limit Diff Status
@arkenv/vite-plugin 887 B 2 kB 0.0%

All size limits passed!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (4)
packages/vite-plugin/src/index.ts (1)

6-7: If you move InferType to @repo/types, plan for a non-breaking TS surface. E.g., re-export it from this package (or keep a deprecated alias) so downstream imports don’t break.

apps/playgrounds/vite-legacy/.gitignore (1)

15-18: Optional: decide if you want to commit shared VS Code settings for the playground. Currently .vscode/* is ignored except extensions.json; that’s fine, but it prevents sharing settings/launch/tasks if you intended to.

apps/playgrounds/vite-legacy/vite.config.ts (1)

18-36: Drop the debug console.log from the config (or gate it). It adds noise and doesn’t help validate the plugin compatibility goal.

apps/playgrounds/vite-legacy/src/main.tsx (1)

4-10: Avoid ! on the root element; throw a clear error instead.
Right now a missing #root will crash with a less actionable error.

-import App from "./app.tsx";
+import App from "./app.tsx";

-createRoot(document.getElementById("root")!).render(
+const rootEl = document.getElementById("root");
+if (!rootEl) {
+	throw new Error('Missing required DOM element: #root');
+}
+
+createRoot(rootEl).render(
 	<StrictMode>
 		<App />
 	</StrictMode>,
 );
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 434f0d6 and 8f52a70.

⛔ Files ignored due to path filters (4)
  • apps/playgrounds/vite-legacy/public/vite.svg is excluded by !**/*.svg
  • apps/playgrounds/vite-legacy/src/assets/react.svg is excluded by !**/*.svg
  • examples/basic/package-lock.json is excluded by !**/package-lock.json
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (16)
  • apps/playgrounds/vite-legacy/.gitignore (1 hunks)
  • apps/playgrounds/vite-legacy/README.md (1 hunks)
  • apps/playgrounds/vite-legacy/index.html (1 hunks)
  • apps/playgrounds/vite-legacy/package.json (1 hunks)
  • apps/playgrounds/vite-legacy/src/app.css (1 hunks)
  • apps/playgrounds/vite-legacy/src/app.tsx (1 hunks)
  • apps/playgrounds/vite-legacy/src/index.css (1 hunks)
  • apps/playgrounds/vite-legacy/src/main.tsx (1 hunks)
  • apps/playgrounds/vite-legacy/tsconfig.app.json (1 hunks)
  • apps/playgrounds/vite-legacy/tsconfig.json (1 hunks)
  • apps/playgrounds/vite-legacy/tsconfig.node.json (1 hunks)
  • apps/playgrounds/vite-legacy/vite.config.ts (1 hunks)
  • apps/playgrounds/vite/eslint.config.js (0 hunks)
  • arkenv.code-workspace (1 hunks)
  • packages/vite-plugin/src/index.ts (1 hunks)
  • packages/vite-plugin/tsdown.config.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/playgrounds/vite/eslint.config.js
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/coding-guidelines.mdc)

**/*.{ts,tsx}: Prefer type over interface for type definitions in TypeScript
Use TypeScript 5.1+ features when appropriate
Leverage const type parameters for better inference in TypeScript
Use JSDoc comments for public APIs
Use tabs for indentation (configured in Biome)
Use double quotes for strings (configured in Biome)
Organize imports automatically (Biome handles this)
Avoid explicit types when TypeScript can infer them (noInferrableTypes error)
Use as const where appropriate for immutable values (useAsConstAssertion error)
Don't reassign function parameters (noParameterAssign error)
Place default parameters last in function signatures (useDefaultParameterLast error)
Always initialize enum values (useEnumInitializers error)
Declare one variable per statement (useSingleVarDeclarator error)
Avoid unnecessary template literals (noUnusedTemplateLiteral error)
Prefer Number.parseInt over global parseInt (useNumberNamespace error)
Use kebab-case for TypeScript filenames (e.g., create-env.ts)
Use camelCase for function names (e.g., createEnv)
Use PascalCase for type names (e.g., ArkEnvError)
Use UPPER_SNAKE_CASE for environment variables and constants
Include examples in JSDoc comments when helpful for public APIs
Document complex type logic with JSDoc comments
Use ArkEnvError for environment variable validation errors
Provide clear, actionable error messages that include the variable name and expected type

**/*.{ts,tsx}: Use createEnv(schema) as the main function for validated environment objects, available as the default export
Use built-in validators (host, port, url, email) from src/types.ts when available instead of custom validation
Use ArkEnvError for environment variable errors, not generic errors
Environment schema definitions should use built-in validators, ArkType string literals, and support default values in the schema pattern
Use logical grouping for related environment variables in schemas
Use descriptive env...

Files:

  • packages/vite-plugin/tsdown.config.ts
  • packages/vite-plugin/src/index.ts
  • apps/playgrounds/vite-legacy/src/main.tsx
  • apps/playgrounds/vite-legacy/src/app.tsx
  • apps/playgrounds/vite-legacy/vite.config.ts
**/*.{ts,tsx,json,md}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Biome for linting and formatting instead of ESLint and Prettier

Files:

  • packages/vite-plugin/tsdown.config.ts
  • packages/vite-plugin/src/index.ts
  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/src/main.tsx
  • apps/playgrounds/vite-legacy/README.md
  • apps/playgrounds/vite-legacy/tsconfig.node.json
  • apps/playgrounds/vite-legacy/src/app.tsx
  • apps/playgrounds/vite-legacy/tsconfig.json
  • apps/playgrounds/vite-legacy/vite.config.ts
  • apps/playgrounds/vite-legacy/package.json
**/index.ts

📄 CodeRabbit inference engine (.cursor/rules/coding-guidelines.mdc)

Use barrel exports (index.ts) for package entry points

Files:

  • packages/vite-plugin/src/index.ts
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/coding-guidelines.mdc)

Use self-closing JSX elements (useSelfClosingElements error)

Files:

  • apps/playgrounds/vite-legacy/src/main.tsx
  • apps/playgrounds/vite-legacy/src/app.tsx
**/README.md

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Document environment requirements in README files

Files:

  • apps/playgrounds/vite-legacy/README.md
**/package.json

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Use workspace:* protocol for workspace dependencies between packages

Files:

  • apps/playgrounds/vite-legacy/package.json
{packages,apps,tooling}/**/package.json

📄 CodeRabbit inference engine (.cursor/rules/pnpm.mdc)

When referencing workspace packages in dependencies, use the workspace:* protocol instead of version numbers

Files:

  • apps/playgrounds/vite-legacy/package.json
🧠 Learnings (54)
📓 Common learnings
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Applies to packages/vite-plugin/src/**/*.test.ts : Test Vite plugin using the `with-vite-react-ts` example as a fixture and validate plugin works with real Vite projects
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Achieve coverage goals: environment variable parsing and validation, type checking and error handling, default value handling, custom type validation, plugin integration with Vite, and real project build testing using examples as fixtures
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Keep environment variable schemas readable and TypeScript-like using ArkType syntax
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Leverage ArkType's built-in types (e.g., `string.host`, `number.port`) where possible in environment schemas
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.html : Use HTML imports with `Bun.serve()` and don't use Vite for frontend bundling and development
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{html,tsx,jsx} : Use HTML imports with `Bun.serve()` instead of Vite for frontend development
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Use `createEnv(schema)` as the main function for validated environment objects, available as the default export
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.ts : Use `bun --hot` to run TypeScript entry files with hot module reloading enabled
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.test.{ts,tsx,js,jsx} : Use `bun test` instead of `jest` or `vitest` for running tests
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Applies to packages/vite-plugin/src/**/*.test.ts : Use fixture-based testing pattern with `__fixtures__` directory for Vite plugin tests
Learnt from: yamcodes
Repo: yamcodes/arkenv PR: 132
File: packages/arkenv/README.md:13-14
Timestamp: 2025-09-09T17:37:19.650Z
Learning: For yamcodes/arkenv project: Runtime support documentation should link to specific examples: Node.js (examples/basic), Bun (examples/with-bun), Vite (examples/with-vite-react-ts).
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Use built-in `WebSocket` instead of the `ws` package
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: packages/arkenv should not depend on other workspace packages; packages/vite-plugin depends on arkenv; apps/www may depend on workspace packages

Applied to files:

  • arkenv.code-workspace
  • apps/playgrounds/vite-legacy/package.json
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.html : Use HTML imports with `Bun.serve()` and don't use Vite for frontend bundling and development

Applied to files:

  • arkenv.code-workspace
  • apps/playgrounds/vite-legacy/src/app.css
  • apps/playgrounds/vite-legacy/src/main.tsx
  • apps/playgrounds/vite-legacy/src/index.css
  • apps/playgrounds/vite-legacy/README.md
  • apps/playgrounds/vite-legacy/src/app.tsx
  • apps/playgrounds/vite-legacy/index.html
  • apps/playgrounds/vite-legacy/package.json
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{html,tsx,jsx} : Use HTML imports with `Bun.serve()` instead of Vite for frontend development

Applied to files:

  • arkenv.code-workspace
  • apps/playgrounds/vite-legacy/src/main.tsx
  • apps/playgrounds/vite-legacy/README.md
  • apps/playgrounds/vite-legacy/src/app.tsx
  • apps/playgrounds/vite-legacy/index.html
  • apps/playgrounds/vite-legacy/package.json
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx,html,css} : Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild` for bundling

Applied to files:

  • arkenv.code-workspace
  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/src/main.tsx
  • apps/playgrounds/vite-legacy/index.html
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.test.{ts,tsx,js,jsx} : Use `bun test` instead of `jest` or `vitest` for running tests

Applied to files:

  • arkenv.code-workspace
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.test.{ts,tsx,js,jsx} : Use `bun test` instead of `jest` or `vitest` for running tests

Applied to files:

  • arkenv.code-workspace
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{html,ts,tsx,css} : Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild` for bundling

Applied to files:

  • arkenv.code-workspace
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Prefer `Bun.file` over `node:fs` readFile/writeFile methods for file operations

Applied to files:

  • arkenv.code-workspace
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Use `bun <file>` instead of `node <file>` or `ts-node <file>` for running TypeScript and JavaScript files

Applied to files:

  • arkenv.code-workspace
📚 Learning: 2025-11-24T16:04:36.939Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Applies to packages/vite-plugin/src/**/*.test.ts : Test Vite plugin using the `with-vite-react-ts` example as a fixture and validate plugin works with real Vite projects

Applied to files:

  • packages/vite-plugin/tsdown.config.ts
  • packages/vite-plugin/src/index.ts
  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/src/main.tsx
  • apps/playgrounds/vite-legacy/README.md
  • apps/playgrounds/vite-legacy/tsconfig.node.json
  • apps/playgrounds/vite-legacy/src/app.tsx
  • apps/playgrounds/vite-legacy/index.html
  • apps/playgrounds/vite-legacy/tsconfig.json
  • apps/playgrounds/vite-legacy/vite.config.ts
  • apps/playgrounds/vite-legacy/package.json
📚 Learning: 2025-11-24T16:04:36.939Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Applies to packages/vite-plugin/src/**/*.test.ts : Use fixture-based testing pattern with `__fixtures__` directory for Vite plugin tests

Applied to files:

  • packages/vite-plugin/tsdown.config.ts
  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/README.md
  • apps/playgrounds/vite-legacy/tsconfig.node.json
  • apps/playgrounds/vite-legacy/tsconfig.json
  • apps/playgrounds/vite-legacy/vite.config.ts
  • apps/playgrounds/vite-legacy/package.json
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.test.{ts,tsx} : Use Vitest for testing framework

Applied to files:

  • packages/vite-plugin/tsdown.config.ts
  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/README.md
  • apps/playgrounds/vite-legacy/tsconfig.node.json
  • apps/playgrounds/vite-legacy/tsconfig.json
  • apps/playgrounds/vite-legacy/vite.config.ts
📚 Learning: 2025-11-24T16:04:36.939Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Applies to **/*.test.{ts,tsx} : Use Vitest as the test framework for unit and integration tests

Applied to files:

  • packages/vite-plugin/tsdown.config.ts
  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/README.md
  • apps/playgrounds/vite-legacy/tsconfig.node.json
  • apps/playgrounds/vite-legacy/tsconfig.json
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx,html} : CSS files can be imported directly in TypeScript/JavaScript or referenced in HTML `<link>` tags, and Bun will automatically bundle them

Applied to files:

  • apps/playgrounds/vite-legacy/src/app.css
  • apps/playgrounds/vite-legacy/src/index.css
  • apps/playgrounds/vite-legacy/tsconfig.json
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Avoid explicit types when TypeScript can infer them (`noInferrableTypes` error)

Applied to files:

  • packages/vite-plugin/src/index.ts
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Leverage `const` type parameters for better inference in TypeScript

Applied to files:

  • packages/vite-plugin/src/index.ts
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Document complex type logic with JSDoc comments

Applied to files:

  • packages/vite-plugin/src/index.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Leverage ArkType's type inference for TypeScript types instead of manual type definitions

Applied to files:

  • packages/vite-plugin/src/index.ts
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Use JSDoc comments for public APIs

Applied to files:

  • packages/vite-plugin/src/index.ts
  • apps/playgrounds/vite-legacy/tsconfig.node.json
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: ArkType validates environment variables at runtime and TypeScript types are inferred from the schema definition

Applied to files:

  • packages/vite-plugin/src/index.ts
  • apps/playgrounds/vite-legacy/vite.config.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Use ArkType's `type()` function to define schemas in environment variable definitions

Applied to files:

  • packages/vite-plugin/src/index.ts
  • apps/playgrounds/vite-legacy/vite.config.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Convert ArkType validation errors to `ArkEnvError` for user-friendly error messages that include variable name and expected type

Applied to files:

  • packages/vite-plugin/src/index.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Keep environment variable schemas readable and TypeScript-like using ArkType syntax

Applied to files:

  • packages/vite-plugin/src/index.ts
  • apps/playgrounds/vite-legacy/vite.config.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Leverage ArkType's built-in types (e.g., `string.host`, `number.port`) where possible in environment schemas

Applied to files:

  • packages/vite-plugin/src/index.ts
  • apps/playgrounds/vite-legacy/vite.config.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/scope.ts : Define custom types in `scope.ts` using ArkType's scoped type system for reusability across schemas

Applied to files:

  • packages/vite-plugin/src/index.ts
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript 5.1+ features when appropriate

Applied to files:

  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/README.md
  • apps/playgrounds/vite-legacy/tsconfig.node.json
  • apps/playgrounds/vite-legacy/tsconfig.json
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.ts : Use `bun --hot` to run TypeScript entry files with hot module reloading enabled

Applied to files:

  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/src/main.tsx
  • apps/playgrounds/vite-legacy/README.md
  • apps/playgrounds/vite-legacy/src/app.tsx
  • apps/playgrounds/vite-legacy/tsconfig.json
  • apps/playgrounds/vite-legacy/package.json
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript for the primary language throughout the project

Applied to files:

  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/tsconfig.node.json
  • apps/playgrounds/vite-legacy/tsconfig.json
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Avoid unnecessary template literals (`noUnusedTemplateLiteral` error)

Applied to files:

  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/tsconfig.node.json
  • apps/playgrounds/vite-legacy/tsconfig.json
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.html : HTML files can import `.tsx`, `.jsx`, or `.js` files directly as modules, and Bun will automatically transpile and bundle them

Applied to files:

  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/src/main.tsx
  • apps/playgrounds/vite-legacy/README.md
  • apps/playgrounds/vite-legacy/src/app.tsx
  • apps/playgrounds/vite-legacy/index.html
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Use `as const` where appropriate for immutable values (`useAsConstAssertion` error)

Applied to files:

  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/tsconfig.node.json
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx,json,md} : Use Biome for linting and formatting instead of ESLint and Prettier

Applied to files:

  • apps/playgrounds/vite-legacy/tsconfig.app.json
  • apps/playgrounds/vite-legacy/tsconfig.node.json
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Use `createEnv(schema)` as the main function for validated environment objects, available as the default export

Applied to files:

  • apps/playgrounds/vite-legacy/src/main.tsx
  • apps/playgrounds/vite-legacy/vite.config.ts
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/index.ts : Use barrel exports (`index.ts`) for package entry points

Applied to files:

  • apps/playgrounds/vite-legacy/src/main.tsx
  • apps/playgrounds/vite-legacy/index.html
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.html : Use `<link>` tags in HTML for stylesheets; Bun's CSS bundler will handle bundling automatically

Applied to files:

  • apps/playgrounds/vite-legacy/src/index.css
📚 Learning: 2025-09-09T17:37:19.650Z
Learnt from: yamcodes
Repo: yamcodes/arkenv PR: 132
File: packages/arkenv/README.md:13-14
Timestamp: 2025-09-09T17:37:19.650Z
Learning: For yamcodes/arkenv project: Runtime support documentation should link to specific examples: Node.js (examples/basic), Bun (examples/with-bun), Vite (examples/with-vite-react-ts).

Applied to files:

  • apps/playgrounds/vite-legacy/README.md
  • apps/playgrounds/vite-legacy/package.json
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Organize imports automatically (Biome handles this)

Applied to files:

  • apps/playgrounds/vite-legacy/tsconfig.node.json
  • apps/playgrounds/vite-legacy/tsconfig.json
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to {bin,examples,playgrounds}/**/*.{ts,tsx} : Console usage is allowed in `bin/` and example/playground directories, otherwise treated as warning

Applied to files:

  • apps/playgrounds/vite-legacy/tsconfig.node.json
  • apps/playgrounds/vite-legacy/.gitignore
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Declare one variable per statement (`useSingleVarDeclarator` error)

Applied to files:

  • apps/playgrounds/vite-legacy/tsconfig.node.json
📚 Learning: 2025-11-24T16:04:36.939Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Achieve coverage goals: environment variable parsing and validation, type checking and error handling, default value handling, custom type validation, plugin integration with Vite, and real project build testing using examples as fixtures

Applied to files:

  • apps/playgrounds/vite-legacy/tsconfig.node.json
  • apps/playgrounds/vite-legacy/vite.config.ts
  • apps/playgrounds/vite-legacy/package.json
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Applies to tooling/*/package.json : Tooling in tooling/ directory contains development and testing tools that are not published to npm and excluded from changesets

Applied to files:

  • apps/playgrounds/vite-legacy/.gitignore
  • apps/playgrounds/vite-legacy/package.json
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Build output should go to dist/ directory and be gitignored; source files should be in src/ directory

Applied to files:

  • apps/playgrounds/vite-legacy/.gitignore
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Applies to examples/*/package.json : Examples in examples/ directory are not published, may have their own lock files, and are used as test fixtures

Applied to files:

  • apps/playgrounds/vite-legacy/.gitignore
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Applies to apps/*/package.json : Applications in apps/ directory are not published to npm and may depend on workspace packages

Applied to files:

  • apps/playgrounds/vite-legacy/.gitignore
  • apps/playgrounds/vite-legacy/package.json
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Monorepo directory structure must follow: packages/ (published npm packages), apps/ (applications), examples/ (example projects), tooling/ (development tools), and turbo.json at root

Applied to files:

  • apps/playgrounds/vite-legacy/.gitignore
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.html : HTML files can import .tsx, .jsx, or .js files directly; Bun will automatically transpile and bundle

Applied to files:

  • apps/playgrounds/vite-legacy/index.html
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Environment schema definitions should use built-in validators, ArkType string literals, and support default values in the schema pattern

Applied to files:

  • apps/playgrounds/vite-legacy/vite.config.ts
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Use logical grouping for related environment variables in schemas

Applied to files:

  • apps/playgrounds/vite-legacy/vite.config.ts
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Use descriptive environment variable names that indicate purpose and format

Applied to files:

  • apps/playgrounds/vite-legacy/vite.config.ts
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to packages/arkenv/src/**/*.ts : Main library implementation should be in `src/create-env.ts`, built-in validators in `src/types.ts`, error handling in `src/errors.ts`, and utilities in `src/utils.ts`

Applied to files:

  • apps/playgrounds/vite-legacy/vite.config.ts
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Use `ArkEnvError` for environment variable validation errors

Applied to files:

  • apps/playgrounds/vite-legacy/vite.config.ts
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Use `ArkEnvError` for environment variable errors, not generic errors

Applied to files:

  • apps/playgrounds/vite-legacy/vite.config.ts
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Applies to packages/*/package.json : Packages in packages/ directory must be published to npm and require changesets for versioning, proper exports, and type definitions

Applied to files:

  • apps/playgrounds/vite-legacy/package.json
🔇 Additional comments (8)
packages/vite-plugin/tsdown.config.ts (1)

10-10: Unable to verify configuration change without access to codebase.

The external dependency declaration for "vite" in tsdown.config.ts appears to follow standard Vite plugin practices, but manual verification is required to:

  • Confirm the change is correctly implemented at line 10
  • Validate whether TypeScript type compatibility issues with the hotUpdate hook actually exist in the codebase
  • Verify that any type incompatibilities mentioned in issue #533 are properly resolved within the PR
arkenv.code-workspace (1)

75-78: Workspace folder add looks fine.

apps/playgrounds/vite-legacy/src/app.css (1)

1-42: Looks good (standard Vite template CSS).

apps/playgrounds/vite-legacy/index.html (1)

1-13: LGTM (standard Vite entry HTML).

apps/playgrounds/vite-legacy/package.json (1)

18-27: vite-legacy pins Vite 7, so it won't validate Vite < 7 TypeScript compatibility. Consider pinning this playground to Vite 6.x or adding a Vite 6 playground / CI matrix so the reported PluginOption/hotUpdate typing issues are actually exercised.

apps/playgrounds/vite-legacy/src/index.css (1)

1-68: LGTM for a playground baseline stylesheet.
Focus styling is present (:focus-visible), and light-mode overrides are included.

apps/playgrounds/vite-legacy/tsconfig.json (1)

1-7: Project references in tsconfig.json may need "composite": true in referenced configs only if tsc -b (TypeScript build mode) is used for this project. For Vite-based projects, which use their own bundler, the "composite" setting is typically not required. Verify whether this playground invokes tsc -b in any build or test scripts before requiring changes to the referenced config files.

apps/playgrounds/vite-legacy/tsconfig.app.json (1)

2-26: If tsconfig.json uses project references for this file, add "composite": true.

Also verify the repo's TypeScript version supports noUncheckedSideEffectImports (requires TypeScript 5.6+). The erasableSyntaxOnly option is available in current TypeScript versions.

 {
 	"compilerOptions": {
+		"composite": true,
 		"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
 		"target": "ES2022",

Comment thread apps/playgrounds/vite-legacy/README.md Outdated
Comment thread apps/playgrounds/vite-legacy/src/app.tsx Outdated
Comment thread apps/playgrounds/vite-legacy/src/app.tsx
Comment thread apps/playgrounds/vite-legacy/tsconfig.node.json
@yamcodes
yamcodes merged commit 9e2badc into main Dec 12, 2025
20 checks passed
@yamcodes
yamcodes deleted the 533-not-compatible-with-vite-6-typescript-wise branch December 12, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv docs Adds or changes documentation, or acts as documentation in and of itself example Issues or Pull Requests concerning at least one ArkEnv example. (Found in the `examples/` directory)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not compatible with Vite 6 (TypeScript-wise)

1 participant