Files
vue-tui/pnpm-workspace.yaml
Yunfei He 0a774ddc8c refactor(vite)!: make @vue-tui/vite dev-only; build apps with tsdown (#247)
`vite build` is a browser-first bundler, so producing a runnable Node program
from it meant constantly overriding its defaults (platform, externalization,
inlineDynamicImports, module-preload). Building a Node app is a Node bundler's
job — so split vue-tui's two jobs across two tools:

- @vue-tui/vite is now DEV-ONLY (in-terminal dev server + HMR). Removed
  buildConfigPlugin and the externalize predicate: deleted src/build.ts,
  src/external.ts (+ external.spec.ts) and test/build.sequential.test.ts.
  vueTui() returns just the dev + dev-vmod plugins, and entry normalization is
  dev-only; dev.spec.ts updated.
- Production builds move to tsdown + unplugin-vue: a plain tsdown.config.ts that
  bundles the whole app into one self-contained Node file (dist/*.mjs) runnable
  with no node_modules. platform:node keeps builtins external and emits a real
  createRequire for CJS deps; deps.alwaysBundle inlines everything else.
- Migrated all five examples to tsdown (including flappy-bird, which hand-rolled
  a vite lib-mode self-contained build), and rewrote the examples smoke suite to
  build via tsdown and launch each self-contained bundle from an empty sandbox.
- Added tsdown + unplugin-vue-jsx to the catalog; updated the root and
  @vue-tui/vite READMEs.

BREAKING CHANGE: @vue-tui/vite no longer configures `vite build`. Build the app
with tsdown instead (see the @vue-tui/vite README, examples/*, and the starter).
2026-07-06 00:29:28 +08:00

48 lines
1.2 KiB
YAML

packages:
- apps/*
- packages/*
- tools/*
- examples/*
catalogMode: prefer
catalog:
"@alcalzone/ansi-tokenize": ^0.3.0
ansi-escapes: ^7.3.0
"@types/node": ^24.12.4
typescript: ^5
# vite: npm:@voidzero-dev/vite-plus-core@latest # Vite+ engine (disabled; on vanilla vite)
vite: 8.1.0
vitest: ^4.1.5
vite-plus: ^0.1.22
"@vitejs/plugin-vue-jsx": ^5.1.5
chalk: ^5.6.2
is-in-ci: ^2.0.0
patch-console: ^2.0.0
strip-ansi: ^7.2.0
node-pty: 1.2.0-beta.13
terminal-size: ^4.0.1
tsx: ^4.22.0
string-width: ^8.0.0
unplugin-vue: ^7.2.0
unplugin-vue-jsx: ^0.10.0
tsdown: ^0.22.3
vue-tsc: ^3.3.4
overrides:
# Pin vite's version spec tree-wide (incl. third-party peer ranges) to the catalog version.
# "catalog:" tracks catalog.vite — vanilla 8.1.0 now, NOT Vite+ core (core is the commented
# catalog line above). This is the canonical Vite+ override pattern, just pointed at vanilla.
vite: "catalog:"
# Keep @types/node single too, for stable types across the workspace.
"@types/node": "catalog:"
peerDependencyRules:
allowAny:
- vite
- vitest
allowedVersions:
vite: "*"
vitest: "*"
allowBuilds:
esbuild: true
node-pty: true