Official TypeScript plugin for Poi.
npm install @poi/plugin-typescriptOfficial TypeScript plugin for Poi.
This plugin use ts-loader to transpile TypeScript files, it also uses fork-ts-checker-webpack-plugin to perform type-checking. .ts .tsx and .vue files are supported.
It's possible to run Babel alongside TypeScript using the babel option. When used with Babel, it's recommended to set compilerOptions.target to es2015 or later in tsconfig.json to delegate the rest to Babel for auto polyfill based on browser targets.
``bash`
yarn add @poi/plugin-typescript typescript --dev
`js`
module.exports = {
plugins: [
{
resolve: '@poi/plugin-typescript',
options: {}
}
]
}
Then add a tsconfig.json in your project:
`json`
{
"compilerOptions": {
"target": "es5",
"strict": true,
"module": "es2015",
"moduleResolution": "node"
}
}
- Type: booleanfalse
- Default:
Use Babel after the TypeScript compiler.
- Type: booleantrue
- Default:
Lint TS files with ts-lint at compile time, note that it will only work when you have a tslint.json in your project root.
- Type: stringtsconfig.json
- Default:
The path to the TypeScript config file.
- Type: any
Addtional options for ts-loader.
- Type: any
Additional options for fork-ts-checker-webpack-plugin`.