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
When I updated to 3.6.1, I suddenly got type errors in my monorepo. I traced it back to one of my workspaces now having an emitted type defined as any, where previously in 3.6.0 it was a useful type.
After looking at the changes from 3.6.0 to 3.6.1, I saw that moduleResolution is now set to Node10 if not explicitly configured, overriding the typescript default.
My workaround is to explicitly set moduleResolution, in my case to NodeNext. However, this is going to trip a lot of people up. I believe that the change should be reverted and note added to the readme directing Vue users to explicitly set moduleResolution.
The current fix is fragile in that it affects all other ecosystems to solve a bug for one ecosystem. It will also need maintenance in the future as typescript and its configuration continue to evolve.
Describe the bug
When I updated to 3.6.1, I suddenly got type errors in my monorepo. I traced it back to one of my workspaces now having an emitted type defined as
any
, where previously in 3.6.0 it was a useful type.After looking at the changes from 3.6.0 to 3.6.1, I saw that
moduleResolution
is now set to Node10 if not explicitly configured, overriding the typescript default.My workaround is to explicitly set
moduleResolution
, in my case toNodeNext
. However, this is going to trip a lot of people up. I believe that the change should be reverted and note added to the readme directing Vue users to explicitly setmoduleResolution
.The current fix is fragile in that it affects all other ecosystems to solve a bug for one ecosystem. It will also need maintenance in the future as typescript and its configuration continue to evolve.
Reproduction
https://github.com/Shakeskeyboarde/vite-plugin-dts-bug
Steps to reproduce
Follow the steps in the README.md file of the repo above.
System Info
Validations
The text was updated successfully, but these errors were encountered: