Blogger Information
Blog 67
fans 0
comment 2
visits 72052
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
VUE TS语法tsconfig.json配置
搁浅
Original
749 people have browsed it

tsconfig.json配置文件

  1. {
  2. "compilerOptions": {//编译器选项
  3. "target": "esnext",//用来指定TS编译后的版本,esnext代表最新版本
  4. "module": "esnext",//指定要使用的模块化规范版本,如果设置了outFile,模块化就要设成system
  5. "strict": true,//所以严格检查的总开-关
  6. "jsx": "preserve",
  7. "moduleResolution": "node",
  8. "experimentalDecorators": true,
  9. "skipLibCheck": true,
  10. "esModuleInterop": true,
  11. "allowSyntheticDefaultImports": true,
  12. "forceConsistentCasingInFileNames": true,
  13. "useDefineForClassFields": true,
  14. "sourceMap": true,
  15. "baseUrl": ".",
  16. "extends" :"",//定义被继承的配置文件
  17. "outDir": "./dist",//用来指定编译后的文件目录
  18. "outFile": "./dist/app.js",//设置全局作用域中的代码,合并到一个文件
  19. "allowJs":false,//是否编译JS,默认flase
  20. "checkJs":false,//是否检查JS是否语法合法,默认flase
  21. "removeComments":true,//是否移除注释
  22. "noEmit":true,//不生成注释后的文件
  23. "noEmitOnError":true,//当有错误不生成编译后的文件
  24. "alwaysStrict": false,//是否使用严格模式,默认false
  25. "noImplicitAny": true,//是否不允许隐式的any类型
  26. "noImplicitThis": true,//是否不允许不明确类型的this
  27. "strictNullChecks": true,//是否严格检查空值
  28. "types": [
  29. "webpack-env"
  30. ],
  31. "paths": {
  32. "@/*": [
  33. "src/*"
  34. ]
  35. },
  36. "lib": [//指定项目要用到的库
  37. "esnext",
  38. "dom",
  39. "dom.iterable",
  40. "scripthost"
  41. ]
  42. },
  43. /*
  44. **表示任意目录
  45. *表示任意文件
  46. */
  47. "include": [//指定哪些文件需要编译
  48. "src/**/*.ts",
  49. "src/**/*.tsx",
  50. "src/**/*.vue",
  51. "tests/**/*.ts",
  52. "tests/**/*.tsx"
  53. ],
  54. "exclude": [//不编译哪些目录
  55. "node_modules"
  56. ]
  57. }
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post