This is a opinionated template for using the following:
- React
- Webpack
- TypeScript
- PostCSS
- CSS modules
- CSS in separate file
- HTML template file
yarn install
yarn watch
- Open
dist/index.html
in browser (works without web server in Chrome).
yarn install
yarn build
- Copy
dist
folder 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)
.