4 ms·
> Gzipping removes the need for minification. _need_ is a strong word. You don't _need_ gripping either. Both minifying and gzipping still provide substantial
by pitaj 5y ago
> Gzipping removes the need for minification.
_need_ is a strong word. You don't _need_ gripping either. Both minifying and gzipping still provide substantial benefits.
> Any npm package can be loaded as script tags or through direct es6 module import from unpkg.com
This prevents tree-shaking and dead code elimination.
- Joeri 5y agoWell, the libraries included at runtime from cdn are still minified. It’s only the app code that is gzipped and not minified, and it is only the very largest projects where minification will make a meaningful difference for the app’s own (not library) code. There is usually no point to minifying the app’s own code. As for tree shaking. When using lightweight libraries meant for the no build path this isn’t necessary because these aren’t pulling in lots of dependencies. Preact is tiny and is a good enough react for my needs. I wouldn’t recommend this approach for large web apps, but most web apps are small enough that a no build tools approach seems viable to me.