@tsconfig/taro

A base TSConfig for working with Taro.

Usage no npm install needed!

<script type="module">
  import tsconfigTaro from 'https://cdn.skypack.dev/@tsconfig/taro';
</script>

README

A base TSConfig for working with Taro.

Add the package to your "devDependencies":

npm install --save-dev @tsconfig/taro
yarn add --dev @tsconfig/taro

Add to your tsconfig.json:

"extends": "@tsconfig/taro/tsconfig.json"

The tsconfig.json:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "display": "Taro",
  "compileOnSave": false,
  "compilerOptions": {
    "target": "es2017",
    "module": "commonjs",
    "moduleResolution": "node",
    "allowJs": true,
    "allowSyntheticDefaultImports": true,
    "experimentalDecorators": true,
    "resolveJsonModule": true,
    "skipLibCheck": true,
    "strict": true,
    "noEmit": true,
    "jsx": "react-jsx"
  }
}

You can find the code here.