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
Integrate into tdewolff/minify #13
Comments
Yes, it should be possible. Although esbuild is a bundler, it turns into a regular minifier if you pass
If you want to minify a lot of files at once, you can do something like this:
At this time, I'm not intending for the Go source code in this repo to be a library that other people can use. Go is more just an implementation detail of how I decided to build this tool. So while you can try to include this Go code in your project an call out to it directly, that workflow isn't supported and may break in the future. Calling out to the esbuild command is more stable and less likely to break. This may change in the future as this project matures, but right now esbuild is still working toward an MVP state and I don't want to be unable to make big internal changes to the structure of the project if needed. |
I'm going to close this since I also have very limited time at the moment, and am not interested in doing the work myself to integrate esbuild into tdewolff/minify. This work is probably better tracked by tdewolff/minify#18. That said, definitely feel free to keep asking questions here about how to minify using esbuild! I'm happy to continue answering questions. |
That's fine! Integration is actually fairly straightforward. I'll track this further in tdewolff/minify#18 |
I've added a brief description of how to use the Initial tests show that |
I am very impressed as well. Tried to put esbuild into my production pipe, but there would be too much rewriting. Going to have to hack around it. Why custom FS instead of http.FileSystem? |
Nice work on this project! Very cool results ;-)
If you're interested, do you think it would be possible to integrate this with https://github.com/tdewolff/minify (i.e. replace the JS minifier)? I have very limited time lately, and I've been promising an improved JS minifier for a while now. This project seems like a great replacement of the current JS minifier I have.
The minifiers work on a file-by-file basis (so no bundling, just minifying). Do you have an idea how I could minify a byte-slice using
esbuild
? What do you think?The text was updated successfully, but these errors were encountered: