-
Notifications
You must be signed in to change notification settings - Fork 1
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
Enable rollup for types #16
Conversation
By enabling rollup for typescript types we ensure that the build declaration file is at dist/index.d.ts. Otherwise the declaration files would be kept in the same structure as our source which could be problematic if the src structure changed, leading to a change in the resulting structure of our built files (in dist/) which could be different to the path definitions in our package.json.
Lol, rolling up types is crazy. I need to look into how this is done (don't think TypeScript can do this on its own). |
Have you verified this works by linking the package locally? |
Yes, did exactly that. So it should work, but it would be nice if someone other than me can verify this. |
While this does fix the issue, i would rather like to fix this by correcting the export path and addressing the change that was seemingly introduced in the vite plugin when upgrading those dependencies. Instead of just bundling all types into a single file which is not the default option, to stay aligned with sane defaults, as i do not see any benefit in the rollup option. |
I would close this in favor of #17, which also addresses two other issues. |
We should probably merge both PRs. Since bundling types is as far as i see the default for many libraries. (for example https://www.npmjs.com/package/@vue/runtime-core?activeTab=code). In our case it's not necessary to bundle our types, but may prevent further issues. |
We can merge this too, but we should adjust the changelog to only include fixing the issue once and maybe just add this one without a changelog, because it does not change anything the user sees |
You are right, updated it. |
Also please quickly resolve the conflicts |
done @saibotk |
This should fix #15.
By enabling rollup for typescript types we ensure that the build declaration file is at dist/index.d.ts.
Otherwise the declaration files would be kept in the same structure as our source which could be problematic if the src structure changed, leading to a change in the resulting structure of our built files (in dist/) which could be different to the path definitions in our package.json.
I'm still unsure why the built behavior changed.
Could you also test this change @saibotk