See this application live at: https://hn.kristoferbaxter.com
This is an example of a PWA built using Preact, Webpack, and some small opinions. Please do not think of this as the way to build your application. Instead, view this as an example of some concepts used in modern web applications (sw, h2, h2push).
Made with kindness in California. 🏄
- Install yarn
- Install h2o Proxy (to allow for local h2 and h2 push)
- Depends on your OS. Tend to use 'brew' on MacOS -- 'brew update; brew install h2o'
- Install Brotli and Zopfli CLI
- Again, depends on your OS. Typically just use 'brew', 'brew update; brew install brotli; brew install zopfli'
- https://github.com/google/brotli
- https://github.com/google/zopfli
- Install Yarn Dependencies
- yarn install
- Run Locally
- yarn start (chrome only)
- yarn bundle:prod; yarn run start (all browsers)
- Access using your favorite browser
I've focused mostly on first initial load performance, with the small caveat of using Webpack instead of Rollup. I'd like the route based code splitting to provide a extensible model for keeping initial view rendering costs low.
In the future there are plenty of things to do:
- Write a Webpack plugin to allow for split css files based on packages.
- Internationalization/Localization, including RTL layout.
- Support AppCache (even though it's kind of a jerk)
- Allow for posting comments!
- FIX LOTS OF BUGS! ZOMG SO MANY BUGS!