esbuild icon indicating copy to clipboard operation
esbuild copied to clipboard

Building on top of esbuild Analyze

Open jd-carroll opened this issue 1 year ago • 1 comments

Wondering if you would be willing to share the code for https://esbuild.github.io/analyze/ ? Or is it already some place and I am not seeing it (again... 😊) ?

I have a couple of ideas for a new tool which is built on top of the analyzer, but would need to know a little more about how it works. Specifically, if it would be possible to base64 encode (or other means) a metafile as a query string param to have it automatically load.

jd-carroll avatar May 07 '24 15:05 jd-carroll

On GitHub, you can always find the content for <user>.github.io at github.com/<user>/<user>.github.io for any <user>. So the source for esbuild.github.io is here: esbuild/esbuild.github.io.

Specifically, if it would be possible to base64 encode (or other means) a metafile as a query string param to have it automatically load.

This is supported. You can checkout its implementation to understand the usage. A simple example:

let analyze_url = new URL('https://esbuild.github.io/analyze/')
analyze_url.hash = btoa(JSON.stringify(metafile)).replace(/=+$/, '')
window.open(analyze_url, '_blank')

hyrious avatar May 08 '24 01:05 hyrious

@hyrious Thanks, I forgot to check for a separate esbuild user

jd-carroll avatar May 23 '24 15:05 jd-carroll