Describe the bug
Even with a minimal setup, vue-tsc fire errors when isolatedModules flag is active
Reproduction
https://github.com/francoislevesque/vite-issue
What I did
Very simple:
npm init vite@latest
# select vue + vue-ts
npm i
Set isolatedModules to true in tsconfig.json.
Get the following errors:
node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1193:6 - error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided.
1193 [BooleanFlags.shouldCast]?: boolean;
~~~~~~~~~~~~
node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1194:6 - error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided.
1194 [BooleanFlags.shouldCastTrue]?: boolean;
~~~~~~~~~~~~
node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1730:10 - error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided.
1730 export { TrackOpTypes }
~~~~~~~~~~~~
node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1759:10 - error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided.
1759 export { TriggerOpTypes }
~~~~~~~~~~~~~~
System Info
System:
OS: Windows 10 10.0.19042
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 4.64 GB / 15.74 GB
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 96.0.4664.45
Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.29)
Internet Explorer: 11.0.19041.1202
npmPackages:
@vitejs/plugin-vue: ^1.9.3 => 1.10.0
vite: ^2.6.4 => 2.6.14
Used Package Manager
npm
Logs
> vite-issue@0.0.0 build
> vue-tsc --noEmit && vite build
node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1193:6 - error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided.
1193 [BooleanFlags.shouldCast]?: boolean;
~~~~~~~~~~~~
node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1194:6 - error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided.
1194 [BooleanFlags.shouldCastTrue]?: boolean;
~~~~~~~~~~~~
node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1730:10 - error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided.
1730 export { TrackOpTypes }
~~~~~~~~~~~~
node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1759:10 - error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided.
1759 export { TriggerOpTypes }
~~~~~~~~~~~~~~
Found 4 errors.
Validations
Describe the bug
Even with a minimal setup, vue-tsc fire errors when
isolatedModulesflag is activeReproduction
https://github.com/francoislevesque/vite-issue
What I did
Very simple:
Set
isolatedModulestotruein tsconfig.json.Get the following errors:
System Info
System: OS: Windows 10 10.0.19042 CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz Memory: 4.64 GB / 15.74 GB Binaries: Node: 16.13.0 - C:\Program Files\nodejs\node.EXE npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 96.0.4664.45 Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.29) Internet Explorer: 11.0.19041.1202 npmPackages: @vitejs/plugin-vue: ^1.9.3 => 1.10.0 vite: ^2.6.4 => 2.6.14Used Package Manager
npm
Logs
Validations