This is a opinionated template for using the following:
- React
- Webpack
- TypeScript
- PostCSS
- CSS modules
- CSS in separate file
- HTML template file
yarn installyarn watch- Open
dist/index.htmlin browser (works without web server in Chrome).
yarn installyarn build- Copy
distfolder to your target server.
- Build scripts completely separated from source
- Runtime dependencies are added to
src/package.json. - Development dependencies are added to
build/package.json.
- Runtime dependencies are added to
- Image inlining as data-uri
- Automatic inlining based on file size (<1KB gets inlined)
- Force inline using
import * as img from "./img.png?inline"orurl(./img.png?inline). - Force download using
url(./img.png?download).