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

RollupError: "TreeshakingPreset" is not exported by node_modules/rollup/dist/rollup.d.ts #5128

Closed
moltar opened this issue Sep 9, 2023 · 1 comment · Fixed by #5131
Closed

Comments

@moltar
Copy link
Contributor

moltar commented Sep 9, 2023

I am using tsup with the --dts-resolve option, which essentially inlines the type into the bundle.

My use case is to inline tsup's own Options type for some internal tooling.

I am running into an error in the rollup package:

RollupError: "TreeshakingPreset" is not exported by "../../node_modules/rollup/dist/rollup.d.ts", imported by "node_modules/tsup/dist/index.d.ts".

It happens here:

type TreeshakingPreset = 'smallest' | 'safest' | 'recommended';

I can confirm that when I did export it (by editing the file in node_modules), the error went away.

Would you be open to exporting this type?

I can add a PR.

@lukastaegert
Copy link
Member

lukastaegert commented Sep 10, 2023

Would you be open to exporting this type?

Sure, there is no problem in making this public, PR welcome!

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

Successfully merging a pull request may close this issue.

2 participants