Typescript transformer for InfernoJS.
A Typescript transformer is like a plugin to the Typescript compiler, so if you're using Typescript anyway in your project you don't need Babel as a dependency.
yarn add -D ts-transform-inferno typescript
const transformInferno = require('ts-transform-inferno').default
transformInferno()
It's different depending on what bundler you're using. Please check the examples folder.
Check out the examples folder here.
The examples are already using this. It's a custom transformer than comes before ts-transform-inferno. More about it here.
Look into the examples/fuse-box
folder and the fuse.js
file.
You could also try to build the project by running the following commands:
cd examples/fuse-box && npm install
npm run start:dev
or npm run start:prod
Look into the examples/webpack
folder and its webpack config.
You could also try to build the project by running the following commands:
cd examples/webpack && npm install
npm run build:prod
or npm start
You can run the following command to test: npm test
Write your test in a .tsx
file and add it to tests/cases
.
Compile with npm test
and look into the tests/temp
and verify.
Overwrite references by running the following command: npm run overwrite-references
Run npm test
again to verify that all tests are passing.
Very much inspired by these projects: