@pigs/plugin-typescript
v12.0.1
Published
Official TypeScript plugin for Pigs.
Downloads
2
Readme
@pigs/plugin-typescript
Official TypeScript plugin for Pigs.
Introduction
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.
Install
yarn add @pigs/plugin-typescript typescript --dev
How to use
module.exports = {
plugins: [
{
resolve: '@pigs/plugin-typescript',
options: {}
}
]
}
Then add a tsconfig.json
in your project:
{
"compilerOptions": {
"target": "es5",
"strict": true,
"module": "es2015",
"moduleResolution": "node"
}
}
Options
lintOnSave
- Type:
boolean
- Default:
true
Lint TS files with ts-lint
at compile time, you need to create a tslint.json
in your project.