vant
vant copied to clipboard
vant. cli 7.0.0版本TS开发,build后没有生成lib/index.d.ts文件
Reproduction Link
无
Vant Version
7.0.0
Describe the Bug
build 打包后没有生成lib/index.d.ts,只在各个组件的文件夹下生成了index.d.ts文件,导致在使用时,引入组件无法得到类型提示
打包后目录如下
tsconfig.declaration.json配置如下
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationDir": ".",
"emitDeclarationOnly": true // 只发出声明
},
"include": ["es/**/*", "lib/**/*"],
"exclude": ["node_modules", "**/test/**/*", "**/demo/**/*"]
}
tsconfig.json
{
"compilerOptions": {
"noImplicitAny": false,
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"declaration": true,
},
}
Reproduce Steps
pnpm run build
Device / Browser
No response
顶,我也出现了。请问怎么解决呢