webrecorder / browsertrix

Browsertrix is the hosted, high-fidelity, browser-based crawling service from Webrecorder designed to make web archiving easier and more accessible for all!
https://webrecorder.net/browsertrix
GNU Affero General Public License v3.0
202 stars 35 forks source link

Minify Lit/html in prod build #55

Open SuaYoo opened 2 years ago

SuaYoo commented 2 years ago

Lit elements/HTML markup is not currently minified in the prod build.

See https://lit.dev/docs/tools/production/#preparing-code-for-production

https://github.com/terser/terser/issues/951

emma-sg commented 1 year ago

https://www.npmjs.com/package/minify-html-literals-loader this might do some of what we want?

SuaYoo commented 1 year ago

If I remember correctly the https://github.com/asyncLiz/minify-html-literals dependency has some security issues, and it doesn't look like they've released any updates recently. Looks like it may be released by Lit soon, though? https://github.com/lit/lit/issues/3900