okikio / bundlejs

An online tool to quickly bundle & minify your projects, while viewing the compressed gzip/brotli bundle size, all running locally on your browser.
https://bundlejs.com
MIT License
787 stars 14 forks source link

Fetching incorrect entry file from unpkg.com #79

Closed crimx closed 1 week ago

crimx commented 1 week ago

Here is an simple example package adaptive-set. It exports both cjs and esm.

{
  "main": "./dist/index.js",
  "module": "./dist/index.mjs",
  "types": "./dist/index.d.ts",
}
  1. bundlejs with "cdn": "https://unpkg.com", config (link) fetches the cjs entry Fetch https://unpkg.com/adaptive-set@0.1.2/dist/index.js (501 B (gzip)).
  2. bundlejs with "cdn": "https://esm.sh", config (link) fetches the correct esm entry Fetch https://esm.sh/v135/adaptive-set@0.1.2/es2022/adaptive-set.mjs (203 B (gzip)).

    Anthor bug. It seems like the badge result generated by custom config does not work. It always points to the reuslt generated by the default config. (501 B (gzip))

deno.bundlejs.com/badge?q=adaptive-set&treeshake=[*]&config={"cdn":"https://esm.sh"}

okikio commented 1 week ago

This should now be fixed. With regards to the caching, I've reduced the strictness of caching. Please give it a try. 👍🏽