Describe the bug
What I'm Doing
I am building a Vite Plus server package with vp pack and declaration generation enabled via pack.dts: true.
This was originally encountered while building a larger server app Dockerfile, but the linked repro removes the app-specific code. The repro fails with a single small TypeScript entrypoint as long as pack.dts: true and typescript@7.0.1-rc are used together.
Expected Behavior
I expect vp pack to build the server package successfully and emit declaration output.
Actual Behavior
vite-plus@0.2.4 fails during declaration generation when the project uses typescript@7.0.1-rc. The failure happens in rolldown-plugin-dts:generate with:
Error [PLUGIN_ERROR]: No "exports" main defined in .../node_modules/typescript/package.json
Controls checked:
pack.dts: true + typescript@7.0.1-rc fails.
pack.dts: false + typescript@7.0.1-rc passes.
pack.dts: true + typescript@6.0.3 passes.
Reproduction
https://github.com/Luzefiru/repro-ts-7-vp-pack-build-error
Steps to reproduce
vp install
vp run -v --filter server build
The Docker path also reproduces the same issue:
docker build -f apps/server/Dockerfile .
System Info
Relevant package versions:
{
"vite-plus": "0.2.4",
"@voidzero-dev/vite-plus-core": "0.2.4",
"vite": "npm:@voidzero-dev/vite-plus-core@0.2.4",
"typescript": "7.0.1-rc"
}
Relevant `apps/server/vite.config.ts`:
import { defineConfig } from "vite-plus";
export default defineConfig({
pack: {
clean: true,
deps: {
alwaysBundle: [/./],
onlyBundle: false
},
dts: true,
entry: "./src/index.ts",
format: "esm",
minify: true,
outDir: "./.output",
sourcemap: true
}
});
Output of `vp env current`:
Environment:
Version 24.18.0
Source lts
Tool Paths:
node C:\Users\admin\.vite-plus\js_runtime\node\24.18.0\node.exe
npm C:\Users\admin\.vite-plus\js_runtime\node\24.18.0\npm.cmd
npx C:\Users\admin\.vite-plus\js_runtime\node\24.18.0\npx.cmd
Package Manager:
Name pnpm
Version 11.3.0
Source packageManager
Source Path C:\Users\admin\Desktop\code\tsu-moe\vp-ts-7-compat-repro\package.json
Project Root C:\Users\admin\Desktop\code\tsu-moe\vp-ts-7-compat-repro
Bin Path C:\Users\admin\.vite-plus\package_manager\pnpm\11.3.0\pnpm\bin\pnpm.cmd
Output of `vp --version`:
vp v0.2.4
Local vite-plus:
vite-plus v0.2.4
Tools:
vite v8.1.3
rolldown v1.1.4
vitest v4.1.10
oxfmt v0.57.0
oxlint v1.72.0
oxlint-tsgolint v0.24.0
tsdown v0.22.3
Environment:
Package manager pnpm v11.3.0
Node.js v24.18.0
Used Package Manager
pnpm
Logs
~/apps/server$ cross-env IS_BUILD=true vp pack ⊘ cache disabled
ℹ entry: ./src/index.ts
ℹ Build start
error: Build failed with 1 error:
[plugin rolldown-plugin-dts:generate]
Error: No "exports" main defined in C:\Users\admin\Desktop\code\tsu-moe\vp-ts-7-compat-repro\node_modules\.pnpm\@voidzero-dev+vite-plus-cor_71c86e39b8d17d46f75767628e7026cd\node_modules\typescript\package.json
Error [PLUGIN_ERROR]: No "exports" main defined in C:\Users\admin\Desktop\code\tsu-moe\vp-ts-7-compat-repro\node_modules\.pnpm\@voidzero-dev+vite-plus-cor_71c86e39b8d17d46f75767628e7026cd\node_modules\typescript\package.json
at exportsNotFound (node:internal/modules/esm/resolve:314:10)
at packageExportsResolve (node:internal/modules/esm/resolve:662:9)
at resolveExports (node:internal/modules/cjs/loader:707:36)
at Module._findPath (node:internal/modules/cjs/loader:774:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1502:27)
at wrapResolveFilename (node:internal/modules/cjs/loader:1071:27)
at defaultResolveImplForCJSLoading (node:internal/modules/cjs/loader:1095:10)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1122:12)
at Module._load (node:internal/modules/cjs/loader:1294:5)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at aggregateBindingErrorsIntoJsError (.../@voidzero-dev/vite-plus-core/dist/rolldown/shared/error-BlQ0-ek7.mjs:48:18)
at unwrapBindingResult (.../@voidzero-dev/vite-plus-core/dist/rolldown/shared/error-BlQ0-ek7.mjs:18:128)
at #build (.../@voidzero-dev/vite-plus-core/dist/rolldown/shared/rolldown-build-Cs2iVJuw.mjs:3256:34)
at async build (.../@voidzero-dev/vite-plus-core/dist/rolldown/index.mjs:42:22)
at async Promise.all (index 0)
at async buildSingle (.../@voidzero-dev/vite-plus-core/dist/tsdown/build-B_nvJe4A-CvbtVBxy.js:6342:19)
at async Promise.all (index 0)
at async buildWithConfigs (.../@voidzero-dev/vite-plus-core/dist/tsdown/build-B_nvJe4A-CvbtVBxy.js:6298:18)
at async runBuild (.../vite-plus/dist/pack-bin.js:701:3)
at async CAC.<anonymous> (.../vite-plus/dist/pack-bin.js:703:2)
In Docker, the failing path is:
/app/node_modules/.pnpm/@voidzero-dev+vite-plus-core@0.2.4_@types+node@26.1.0_typescript@7.0.1-rc/node_modules/typescript/package.json
Direct package-root resolution also fails with TypeScript 7:
node -e "try{console.log(require.resolve('typescript'))}catch(e){console.error(e.code); console.error(e.message); process.exit(1)}"
Output:
ERR_PACKAGE_PATH_NOT_EXPORTED
No "exports" main defined in .../node_modules/typescript/package.json
The observed `typescript@7.0.1-rc` package exports include subpaths such as `./unstable/sync`, `./unstable/async`, and `./package.json`, but no `"."` export.
Validations
Describe the bug
What I'm Doing
I am building a Vite Plus server package with
vp packand declaration generation enabled viapack.dts: true.This was originally encountered while building a larger server app Dockerfile, but the linked repro removes the app-specific code. The repro fails with a single small TypeScript entrypoint as long as
pack.dts: trueandtypescript@7.0.1-rcare used together.Expected Behavior
I expect
vp packto build the server package successfully and emit declaration output.Actual Behavior
vite-plus@0.2.4fails during declaration generation when the project usestypescript@7.0.1-rc. The failure happens inrolldown-plugin-dts:generatewith:Controls checked:
pack.dts: true+typescript@7.0.1-rcfails.pack.dts: false+typescript@7.0.1-rcpasses.pack.dts: true+typescript@6.0.3passes.Reproduction
https://github.com/Luzefiru/repro-ts-7-vp-pack-build-error
Steps to reproduce
The Docker path also reproduces the same issue:
docker build -f apps/server/Dockerfile .System Info
Relevant package versions: { "vite-plus": "0.2.4", "@voidzero-dev/vite-plus-core": "0.2.4", "vite": "npm:@voidzero-dev/vite-plus-core@0.2.4", "typescript": "7.0.1-rc" } Relevant `apps/server/vite.config.ts`: import { defineConfig } from "vite-plus"; export default defineConfig({ pack: { clean: true, deps: { alwaysBundle: [/./], onlyBundle: false }, dts: true, entry: "./src/index.ts", format: "esm", minify: true, outDir: "./.output", sourcemap: true } }); Output of `vp env current`: Environment: Version 24.18.0 Source lts Tool Paths: node C:\Users\admin\.vite-plus\js_runtime\node\24.18.0\node.exe npm C:\Users\admin\.vite-plus\js_runtime\node\24.18.0\npm.cmd npx C:\Users\admin\.vite-plus\js_runtime\node\24.18.0\npx.cmd Package Manager: Name pnpm Version 11.3.0 Source packageManager Source Path C:\Users\admin\Desktop\code\tsu-moe\vp-ts-7-compat-repro\package.json Project Root C:\Users\admin\Desktop\code\tsu-moe\vp-ts-7-compat-repro Bin Path C:\Users\admin\.vite-plus\package_manager\pnpm\11.3.0\pnpm\bin\pnpm.cmd Output of `vp --version`: vp v0.2.4 Local vite-plus: vite-plus v0.2.4 Tools: vite v8.1.3 rolldown v1.1.4 vitest v4.1.10 oxfmt v0.57.0 oxlint v1.72.0 oxlint-tsgolint v0.24.0 tsdown v0.22.3 Environment: Package manager pnpm v11.3.0 Node.js v24.18.0Used Package Manager
pnpm
Logs
Validations