Skip to content

support for tarballs #78

@TkDodo

Description

@TkDodo

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 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions