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

Add minified versions of extensions #1089

Open
mlissner opened this issue Oct 17, 2022 · 3 comments
Open

Add minified versions of extensions #1089

mlissner opened this issue Oct 17, 2022 · 3 comments

Comments

@mlissner
Copy link

At least a few of the extensions would benefit from this, and as HTMX takes over the world, there's probably an environmental/ethical argument to be made.

I poked around and didn't see what minifies the htmx file itself, but it'd be nice to apply that to extensions too, if that's not too difficult.

@lukasjuhrich
Copy link

I poked around and didn't see what minifies the htmx file itself

Wouldn't that be this custom npm command?

"uglify": "uglifyjs -m eval -o dist/htmx.min.js dist/htmx.js"

@airblast-dev
Copy link
Contributor

I poked around and didn't see what minifies the htmx file itself

Wouldn't that be this custom npm command?

"uglify": "uglifyjs -m eval -o dist/htmx.min.js dist/htmx.js"

I don't really see why this couldn't be done automatically for the extensions.

Using uglifyjs on the extension and then serving it locally is a solution, but I think just having a minified version in dist/ext would make more sense.

If the feature is approved, I would be happy to write a script for doing it and then create a PR.

@marisst
Copy link
Contributor

marisst commented Dec 21, 2024

@mlissner @lukasjuhrich @airblast-dev I implemented extension minification in a new PR in the extensions repository using the same method as the core htmx library. Please have a look and hope you have good Christmas. 🌲

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

Successfully merging a pull request may close this issue.

4 participants