Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with Vite >= 3.1.0 #13

Open
jayalfredprufrock opened this issue Sep 23, 2022 · 3 comments
Open

Incompatible with Vite >= 3.1.0 #13

jayalfredprufrock opened this issue Sep 23, 2022 · 3 comments

Comments

@jayalfredprufrock
Copy link

Building with Vite > 3.1.0 gives the following error:

error during build:
TypeError: Cannot set properties of undefined (setting 'generateBundle')
    at configResolved (/.../vite-dts/dist/cjs/plugin.js:56:33)

Worked fine prior to 3.1.0 release. Appears to be related to "this" (pun intended): vitejs/vite@2d2f2e5

I believe the fix is to move the generateBundle function def outside of the configResolved function.

jayalfredprufrock added a commit to jayalfredprufrock/vite-dts that referenced this issue Sep 23, 2022
@BryanAdamss
Copy link

same issue😅

@LucasNovaes2016
Copy link

I had the same issue. One solution I found was to replace the "vite-dts" library by "vite-plugin-dts". They seem to do exactly the same thing, but the last one has more recent updates and doesn't give me an error when generating the build.

@mesqueeb
Copy link

@LucasNovaes2016 vite-plugin-dts however doesn't support typescript 5+ 😭 any other workaround you know of?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants