Preact-cli: There is no gzip for js bundles

Created on 22 Aug 2017  路  8Comments  路  Source: preactjs/preact-cli

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
No gzip on js files

If the current behavior is a bug, please provide the steps to reproduce.
Setup project with preact-cli 1.4.1. Open localhost:8080 and check the network tab in Chrome

What is the expected behavior?
Gzip enabled

Please mention other relevant information.

  • node version (8.2.1)
  • npm version (5.3.0)
  • Operating system (Mac OS 10.12.6)
help wanted stale

Most helpful comment

My 2 cents:

  • Need to compress the output at build step: messing with native dependencies, probably means lots of new issues.
  • We need to change simplehttp2server /superstatic to something production ready so that users can run npm run serve

All 8 comments

As of now we are not compressing the js bundle. Probably we add an option to the build command so the use can choose if he wants gzipping or not.

/cc @kristoferbaxter @developit

inb4 we should also do brotli

We have the option of using Zopfli as well. @kristoferbaxter can give more insights on this.

My 2 cents:

  • Need to compress the output at build step: messing with native dependencies, probably means lots of new issues.
  • We need to change simplehttp2server /superstatic to something production ready so that users can run npm run serve

I don't think there's an h2 alternative for simplehttp2server, but we could use serve instead of superstatic. I think they might be looking into supporting the same config format?

We can go with zopfli + brotli for this.

COnsider using wasm version (if any) instead of the native C version. It would save everyone a tons of time

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nephix picture nephix  路  4Comments

andybons picture andybons  路  3Comments

AlStar01 picture AlStar01  路  3Comments

ajay28kumar picture ajay28kumar  路  3Comments

hardcoar picture hardcoar  路  3Comments