An open API service indexing awesome lists of open source software.

https://github.com/otbe/webpack4-typescript-babel-pwa-starter

Webpack4 + Typescript + Babel + CSS Modules + HMR + PWA Starter
https://github.com/otbe/webpack4-typescript-babel-pwa-starter

babel cssmodules hmr pwa typescript webpack4

Last synced: about 2 months ago
JSON representation

Webpack4 + Typescript + Babel + CSS Modules + HMR + PWA Starter

Awesome Lists containing this project

README

          

# Webpack4 + Typescript + Babel + CSS Modules + HMR + PWA Starter

A simple (hopefully) state of the art starter.
It includes:

* webpack4
* babel + TypeScript
* CSS Modules (incl. TypeScript support)
* HMR (via [react-hot-loader](https://github.com/gaearon/react-hot-loader))
* manifest.json (via [webpack-pwa-manifest](https://github.com/arthurbergmz/webpack-pwa-manifest))
* ServiceWorker (via [offline-plugin](https://github.com/NekR/offline-plugin))
* critical css (via [html-critical-webpack-plugin](https://github.com/anthonygore/html-critical-webpack-plugin))
* prerendering of routes (via [prerender-spa-plugin](https://github.com/chrisvfritz/prerender-spa-plugin)) see [package.json](./package.json)
* image optimizing (via [responsive-loader](https://github.com/herrstucki/responsive-loader) and [imagemin-webpack-plugin](https://github.com/Klathmon/imagemin-webpack-plugin))

Lighthouse score 99 (perf)

## How to run

`$ yarn`
`$ yarn watch`

Production build:
`$ yarn build`

Use [serve](https://www.npmjs.com/package/serve) to serve your build:
`$ serve -c 0 -s -p 9000 dist/`

## Want to improve?

I'm happy to accept some PRs to get a higher lighthouse score. :)