-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed as not planned
Closed as not planned
Copy link
Labels
ExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.
Description
π Search Terms
parseJsonConfigFileContent
parseJsonConfigFileContent is not defined
π Version & Regression Information
- This changed between versions 5.0 and 5.9.3
β― Playground Link
No response
π» Code
// index.ts
const a: number = "a";
npm init
npm install vue-tsc
npx vue-tsc index.ts --noEmit
π Actual behavior
In version 4.x, the function parseJsonConfigFileContent in commandLineParser.ts will be packed in tsc.js.
but in version 5.x, it will be tree-shaked with esbuild. The final product does not include this function.
Tools such as vue-tsc will use this function, will report errors:
pnpm exec vue-tsc index.ts --noEmit
D:\test code\test 1\node_modules\.pnpm\vue-tsc@3.1.1_typescript@5.9.3\node_modules\vue-tsc\index.js:36
throw err;
^
ReferenceError: parseJsonConfigFileContent is not defined
at eval (eval at get (D:\test code\test 1\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\lib\tsc.js:122085:240), <anonymous>:1:1)
at Object.get (D:\test code\test 1\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\lib\tsc.js:122085:240)
at Object.createParsedCommandLineByJson (D:\test code\test 1\node_modules\.pnpm\@vue+language-core@3.1.1_typescript@5.9.3\node_modules\@vue\language-core\lib\compilerOptions.js:27:23)
at D:\test code\test 1\node_modules\.pnpm\vue-tsc@3.1.1_typescript@5.9.3\node_modules\vue-tsc\index.js:14:20
at Object.apply (D:\test code\test 1\node_modules\.pnpm\@volar+typescript@2.4.23\node_modules\@volar\typescript\lib\node\proxyCreateProgram.js:50:33)
at performCompilation (D:\test code\test 1\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\lib\tsc.js:132244:19)
at executeCommandLineWorker (D:\test code\test 1\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\lib\tsc.js:132086:7)
at executeCommandLine (D:\test code\test 1\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\lib\tsc.js:132133:12)
at Object.<anonymous> (D:\test code\test 1\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\lib\tsc.js:133824:1)
at Module._compile (node:internal/modules/cjs/loader:1554:14)
Node.js v22.14.0
π Expected behavior
The function parseJsonConfigFileContent built-in _tsc.js.
Then vue-tsc can work.
Additional information about the issue
Thank you for read this.
Metadata
Metadata
Assignees
Labels
ExternalRelates to another program, environment, or user action which we cannot control.Relates to another program, environment, or user action which we cannot control.