Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vant. cli 7.0.0版本TS开发,build后没有生成lib/index.d.ts文件 #13047

Open
wukongyang opened this issue Aug 7, 2024 · 0 comments
Open

Comments

@wukongyang
Copy link

Reproduction Link

Vant Version

7.0.0

Describe the Bug

build 打包后没有生成lib/index.d.ts,只在各个组件的文件夹下生成了index.d.ts文件,导致在使用时,引入组件无法得到类型提示
打包后目录如下
image

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant