A TypeScript Inferno JSX example building with browserify/tsify, including tree-shaking and minification. Also includes an example of development server with source maps and hot reload.
Based on inferno-typescript-example and tsify React sample.
Typescript is configured to transpile JSX within .tsx files
to plain JS with createElement.
The JSX factory is defined locally at the top of each .tsx file.
npm install
npm run buildbrowserify configuration:
process.envconstants with envify- dead-code elimination with uglifyify
- tree-shaking with common-shakeify
- "flat" bundle with browser-flat-pack
the bundled output from browserify is minified with terser:
gzipped, this example fits in 8k bytes.
serve the build output from a local server:
npm startbased on budo with source maps and hot reload.
npm run debugMIT
- Greg Smith smrq et al. for tsify React sample.
- Dominic Gannaway trueadm et al. for inferno-typescript-example.