paranext / paranext-core

Electron client, extension host, and C# library for Paranext
https://paranext.github.io/paranext-core/
MIT License
16 stars 2 forks source link

Bundler: Minify HTML web views? #493

Open tjcouch-sil opened 1 year ago

tjcouch-sil commented 1 year ago

It appears the minify step happens after plugins are run, so inserting the web view code as string uses the unminified version. It would be good to figure out how to minify these (must preserve the component function name in React web views) to make the websocket messages for web views smaller.

tjcouch-sil commented 1 year ago

This is now accomplished in React web views by https://github.com/paranext/paranext-core/issues/119

Still need to do with HTML if we decide to do so: https://github.com/vbenjs/vite-plugin-html

tjcouch-sil commented 1 year ago

https://github.com/vbenjs/vite-plugin-html

tjcouch-sil commented 1 year ago

https://webpack.js.org/loaders/html-loader/#esmodule https://webpack.js.org/plugins/html-webpack-plugin/

tjcouch-sil commented 1 year ago

https://webpack.js.org/plugins/html-minimizer-webpack-plugin