mathiasbynens/he

Minified version?

timschwab opened this issue · 10 comments

Is there a minified version or a CDN version that we can include in the browser? On your readme, I see the <script> include, but it'd be nice to have it all rolled up into a single minified file.

CDNJS hosts a copy, although they don’t serve it as UTF-8: https://cdnjs.com/libraries/he

cdnjs/cdnjs#12756

Generally, if you need this in the browser, I’d expect you to add he.js to your existing build+minify process.

@styfle Interestingly, https://cdn.jsdelivr.net/npm/he@1.2.0/he.min.js says:

Skipped minification because the original files appears to be already minified.

That is interesting 🤔

I’m on my phone so I can’t tell if it’s actually minified already or a bug in jsdelivr.

It’s definitely not minified already.

@MartinKolarik Can we fix the min detection here?

The file has some very long lines so we currently detect it as minified. I'll check if this could be improved.

We improved the detection of minified files and the above link serves a minified file now.

That answers it! Use jsDelivr.

https://cdn.jsdelivr.net/npm/he
https://cdn.jsdelivr.net/npm/he@1.2.0/he.min.js