You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Since Nx 16.4.0 the @nx/vite build executor runs a TypeScript type check before the vite build. This new behaviour is turned on by default.
I think this potentially breaks a lot of projects and should have been introduced with skipTypeCheck=true for 16.* with a warning and switched to skipTypeCheck=false in Nx 17.
As a consequence, we need to make the generated projects compatible with a regular TS type check and therefore shim the Vue SFC within an included .d.ts file.
The second issue found in the generated default app in the router config is related to a different issue. The missing type augmentation from vite/client.d.ts for import.meta are not available because the types in tsconfig.app.json override the types specified in tsconfig.json. The best way to fix this would be to add vite/client.d.ts to the types specified in tsconfig.app.json or even remove the types from it completely and let it inherit from tsconfig.json.
To Reproduce
Use any version of Nx after 16.4.0
Install nxext/vue
Generate a new app with the router config turned on
Run a build
Expected behavior
The build should complete without any errors.
The text was updated successfully, but these errors were encountered:
Describe the bug
Since Nx 16.4.0 the @nx/vite build executor runs a TypeScript type check before the vite build. This new behaviour is turned on by default.
See: nrwl/nx@b953565#diff-25207db542ebf5643a1b5bf75c5e812f6503b1026bfc8a156b7fc82b4bb0ab43R24-R28
And: https://github.com/nrwl/nx/blob/master/packages/vite/src/executors/build/build.impl.ts#L47-L53
I think this potentially breaks a lot of projects and should have been introduced with
skipTypeCheck=true
for 16.* with a warning and switched toskipTypeCheck=false
in Nx 17.As a consequence, we need to make the generated projects compatible with a regular TS type check and therefore shim the Vue SFC within an included .d.ts file.
The second issue found in the generated default app in the router config is related to a different issue. The missing type augmentation from
vite/client.d.ts
forimport.meta
are not available because the types intsconfig.app.json
override the types specified intsconfig.json
. The best way to fix this would be to addvite/client.d.ts
to the types specified intsconfig.app.json
or even remove the types from it completely and let it inherit fromtsconfig.json
.To Reproduce
Expected behavior
The build should complete without any errors.
The text was updated successfully, but these errors were encountered: