Skip to content

feat(cli): support node --import vite-plus/register - #3208

Open
fengmk2 wants to merge 7 commits into
mainfrom
feat/script-import-loader
Open

fengmk2 wants to merge 7 commits into
mainfrom
feat/script-import-loader

Conversation

@fengmk2

@fengmk2 fengmk2 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Tools that must start node themselves need a preload entry for TypeScript. Add vite-plus/register so they can replace node --import tsx and keep Node.js flags, test discovery, and watch behavior. The entry uses the existing vpx loader and accepts TSX_TSCONFIG_PATH. Existing compiler differences from tsx still apply.

Each worker keeps its own loader configuration. The pinned oxc-node commit supplies this isolation without a local source patch. Repository setup fetches pinned commits that a branch or tag fetch does not include.

vp migrate replaces plain tsx preloads and supported literal NODE_OPTIONS assignments. It checks the child scripts and wrapped commands that inherit each assignment. Commands that still need tsx keep their original preload and dependency.

This PR depends on oxc-node#888. It pins that PR's commit; the final pin must use the merged upstream commit.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-script-import-loader-viteplus-dev.voidzero-docs.workers.dev (commit 912d703)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://6fd3a1cd-viteplus-dev.voidzero-docs.workers.dev 912d703 2026-10-23T15:18:35.937Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://94748ba7-viteplus-dev.voidzero-docs.workers.dev 0c48dad 2026-10-23T13:21:11.656Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://3d722c67-viteplus-dev.voidzero-docs.workers.dev 0ff482c 2026-10-23T08:49:19.487Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://7fa6c9f2-viteplus-dev.voidzero-docs.workers.dev 94b0392 2026-10-23T08:32:38.837Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://24e94d6f-viteplus-dev.voidzero-docs.workers.dev 77857bb 2026-10-23T07:10:36.837Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://9cd587a2-viteplus-dev.voidzero-docs.workers.dev 4e91042 2026-10-23T06:28:26.107Z Visit the dashboard ↗

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: 912d703

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

CLI artifact sizes (912d703)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.
The dist rows use the Linux build. The core total excludes .node files to match the release artifact.

Artifact Format Base PR Change
packages/cli/dist Directory total 2.25 MiB 2.26 MiB +11.25 KiB (+0.49%)
packages/core/dist Directory total 4.07 MiB 4.07 MiB 0 B (0.00%)
Combined package dist Directory total 6.33 MiB 6.34 MiB +11.25 KiB (+0.17%)
vp (Linux x64) Binary 8.22 MiB 8.22 MiB 0 B (0.00%)
vp (Linux x64) gzip -9 3.76 MiB 3.76 MiB +32 B (+0.00%)
NAPI (Linux x64) Binary 35.45 MiB 35.46 MiB +3.31 KiB (+0.01%)
NAPI (Linux x64) gzip -9 14.12 MiB 14.12 MiB +4.41 KiB (+0.03%)
vp (macOS ARM64) Binary 5.38 MiB 5.38 MiB 0 B (0.00%)
vp (macOS ARM64) gzip -9 3.20 MiB 3.20 MiB -20 B (-0.00%)
NAPI (macOS ARM64) Binary 42.23 MiB 42.25 MiB +16.16 KiB (+0.04%)
NAPI (macOS ARM64) gzip -9 18.25 MiB 18.26 MiB +1.97 KiB (+0.01%)
vp (Windows x64) Binary 6.08 MiB 6.08 MiB 0 B (0.00%)
vp (Windows x64) gzip -9 2.81 MiB 2.81 MiB +158 B (+0.01%)
NAPI (Windows x64) Binary 31.50 MiB 31.51 MiB +12.00 KiB (+0.04%)
NAPI (Windows x64) gzip -9 12.83 MiB 12.83 MiB +3.17 KiB (+0.02%)
Trampoline (Windows x64) Binary 13.50 KiB 13.50 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 7.09 KiB 7.09 KiB +2 B (+0.03%)
Installer (Windows x64) Binary 4.67 MiB 4.67 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.24 MiB 2.24 MiB 0 B (0.00%)

@fengmk2 fengmk2 changed the title feat(cli): add public TypeScript preload feat(cli): support node --import vite-plus/register Oct 23, 2026
@fengmk2
fengmk2 marked this pull request as ready for review October 23, 2026 14:00
@fengmk2
fengmk2 added this pull request to stack #3214 October 23, 2026 14:01

This branch has not been deployed

No deployments
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.

1 participant