Skip to content

🙏🏻(feature request) add minify control as URL flag #1107

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

Open
rivy opened this issue Mar 16, 2025 · 0 comments
Open

🙏🏻(feature request) add minify control as URL flag #1107

rivy opened this issue Mar 16, 2025 · 0 comments

Comments

@rivy
Copy link
Contributor

rivy commented Mar 16, 2025

I'd like to be able to control minification of the downloaded modules, specifically turning it off, as a URL flag/option.
This would allow much easier reading/debugging of the downloaded modules, allowing local patches, when necessary.
Only on/off would be fine, although more specific control would be great.

I've read through the documentation and I don't see any way to do this except running a local server with the MINIFY configuration set to false.

ref: esbuild ~ minify
ref: esm.sh ~ Self-Hosting

The feature might look something like...

https://esm.sh/[email protected] # usual minified build (the default)
https://esm.sh/[email protected]?minify=on # continue to use `--minify` for the build command (equivalent to the default; optional)
https://esm.sh/[email protected]?minify=off # suppresses `--minify`
# might be useful...
https://esm.sh/[email protected]?minify=whitespace,identifiers,syntax # (maybe?) add specific `--minify-X` options to the build command

I think it would be helpful to be able to actually read the module code when trying to debug problems.

Thanks for the consideration.

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

1 participant