test-tw-publish
Version:
描述
34 lines (33 loc) • 1.54 kB
JSON
{
"compilerOptions": {
"target": "esnext", // 目标语言的版本
"module": "esnext", // 生成代码的模板标准
"experimentalDecorators": true, // 使用装饰器
"useDefineForClassFields": true, // 启用后的作用是将 class 声明中的字段语义从 [[Set]] 变更到 [[Define]] 说明:https://zhuanlan.zhihu.com/p/258906525
"moduleResolution": "node", // 模块解析策略,ts默认用node的解析策略,即相对的方式导入
"strict": true, // 开启所有严格的类型检查
"jsx": "preserve", // 在 .tsx 中支持 JSX 使用Preserve模式编译
"sourceMap": true, // 生成目标文件的sourceMap文件
"resolveJsonModule": true, // ts支持直接导入json文件
"esModuleInterop": true, // 允许export=导出,由import from 导入
"lib": ["esnext", "dom"], // 编译时引入的 ES 功能库
"skipLibCheck": true,
"noEmit": true,
"types": ["node"], // 加载的声明文件包
"baseUrl": "./", // 解析非相对模块的基地址,默认是当前目录
"isolatedModules": true,
"paths": {
"@/*": ["src/*"],
"@agent/*": ["src/plugins/twCtingAgent/src/*"]
}
},
// "auto-imports.d.ts"添加为了解决自动导入ref报错,搭配.eslintrc-auto-import.json
"include": [
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue",
"auto-imports.d.ts"
], // 表示编译需要编译的文件或目录
"references": [{ "path": "./tsconfig.node.json" }] // 指定工程引用依赖
}