Currently, we support most optimizations through the use of a bundler plugin like Webpack. For unbundled builds, we only really support minifying JS, but not much else.
This issue represents the work needed to start building performant, unbundled apps.
Would love any help on pieces of this, if anyone is interested in tackling!
/cc @drwpow
optimize() plugin, internallybuildOptions.optimize = { ... }?modulepreload tags to HTML files, based on the import graph that we detect of their scripts Dang it, I released a user land plugin for HTML minification that I had been using on my personal site before I saw this issue. Can't wait to delete it 馃槃
@jaredLunde any interest in porting it into our @snowpack/plugin-optimize plugin??
For sure! I just took a peek at the plugin and it looks pretty straightforward. Anything specifically you'd like me to know before diving into a PR?
Awesome, thank you!
Yup, the optimize() hooks is pretty straightforward. @drwpow may have some tips but feel free to take a stab at it!
@jaredLunde I just realized that this is pretty important for us to get the new optimize logic released, so I ended up spinning up #1051 to tackle CSS & JS minification together. Thanks again for offering to help, and would love your review on that PR!
All good! Happy to see the plugin come to fruition.
Most helpful comment
Dang it, I released a user land plugin for HTML minification that I had been using on my personal site before I saw this issue. Can't wait to delete it 馃槃