Skip to content
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

Could it support custom compression ? #23

Closed
ziiip opened this issue Nov 8, 2022 · 6 comments
Closed

Could it support custom compression ? #23

ziiip opened this issue Nov 8, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@ziiip
Copy link

ziiip commented Nov 8, 2022

Just like vite-plugin-string did?

@UstymUkhman
Copy link
Owner

Hi @ziiip and thanks for opening this issue. Yeah, I guess it would be pretty easy to implement. I can work on this when I'll have some time for this update. It's not a bad idea to use a custom compress function as an option, but can I ask you what have you found wrong with the current compress implementation?

I mean, I've test it quite a lot and if there's an issue with how it works, I would much prefer fixing it before updating the compress option to use a custom algorithm. Thanks again for your feedback and please consider ⭐ing this plugin if you've found it any useful for your purposes.

@UstymUkhman UstymUkhman self-assigned this Nov 8, 2022
@UstymUkhman UstymUkhman added the enhancement New feature or request label Nov 8, 2022
@ziiip
Copy link
Author

ziiip commented Nov 8, 2022

It worth ⭐, I just forget it.

Actually, I was using Webpack in previous project, and webpack-glsl-minify's minifying seems to be more suitable for me, like c or c++ style comments removing, name mangling (not using it yet). preprocessPass1 and preprocessPass2 are the main minifying code.

This plugin is really useful, especially with Three.js, and I think it could be better with a little enhancement in minifying.

Thanks for the consideration.

@UstymUkhman
Copy link
Owner

Thank you for the explanation and for using it. That totally makes sense. I will add that option, just can't tell you exactly when (maybe this weekend..?) 🙂

@ziiip
Copy link
Author

ziiip commented Nov 8, 2022

As you wish. I am glad that you are going to work on it.
Since I am trapped by many things these days, or I will make a PR with that.

Should I close this issue now, or leave it util you finished?

@UstymUkhman
Copy link
Owner

Naah, I'll close it once I'll publish a new version on NPM.

@UstymUkhman
Copy link
Owner

Closing this since v0.5.4 was published with an option to use a custom compress callback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants