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

support for tarballs #78

Open
TkDodo opened this issue Sep 15, 2024 · 4 comments
Open

support for tarballs #78

TkDodo opened this issue Sep 15, 2024 · 4 comments

Comments

@TkDodo
Copy link

TkDodo commented Sep 15, 2024

Hi 👋 ,

Thanks for working on bundlejs - really love the tool ❤️ .

We use it to show the bundle size in our readme at https://github.com/TanStack/query, which works great.

Lately, we've started to use pkg.pr.new from stackblitz for continuous builds of our PRs. I wanted to see if I can get a quick bundle size report for one of the PRs, but it doesn't work:

- export * from "@tanstack/react-query";
+ export * from "https://pkg.pr.new/@tanstack/react-query@7988";

This yields the following error:

✘ [ERROR] Unexpected "\x1f"

I assume this is because the file that gets downloaded is a tarball. Here is a reproduction url:

https://bundlejs.com/?q=https%3A%2F%2Fpkg.pr.new%2F%40tanstack%2Freact-query%407988&treeshake=%5B*%5D&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22react-dom%22%5D%7D%7D

It would be awesome if these preview builds could be somehow supported. Having this url as a dependency in a package.json works:

"@tanstack/react-query": "https://pkg.pr.new/@tanstack/react-query@7988"

thanks for considering this 🙏

@okikio
Copy link
Owner

okikio commented Sep 15, 2024

Interesting 👀, I'll take a look sometime this week to see if I can implement it

@okikio
Copy link
Owner

okikio commented Sep 16, 2024

I've got a preliminary version working live on the site (not yet working on the API), but there seems to be an odd bug that still needs some work, I'll try getting more progress with it during the week

@TkDodo
Copy link
Author

TkDodo commented Sep 16, 2024

awesome, thank you 🙏

@okikio
Copy link
Owner

okikio commented Sep 21, 2024

This requires a slightly larger architectural change than initially thought, it might take me a couple more weeks to actually implement this properly

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

2 participants