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

The type definition file generated in version 4.0.3 has errors in its content #372

Closed
3 tasks done
0x1f57 opened this issue Aug 20, 2024 · 4 comments
Closed
3 tasks done
Labels
enhancement New feature or request

Comments

@0x1f57
Copy link

0x1f57 commented Aug 20, 2024

Describe the bug

image

This is the same issue as #325 , but appears in version 4.0.3
Generated type definition file has errors when cleanVueFileName is set to true

Reproduction

https://stackblitz.com/edit/vitejs-vite-tpr4pc?file=packages%2Fdist%2Fpackage.json

Steps to reproduce

No response

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz
    Memory: 2.62 GB / 15.94 GB
  Binaries:
    Node: 18.20.3 - ~\AppData\Local\fnm_multishells\16716_1724156337968\node.EXE
    Yarn: 1.22.22 - ~\AppData\Local\fnm_multishells\16716_1724156337968\yarn.CMD
    npm: 10.7.0 - ~\AppData\Local\fnm_multishells\16716_1724156337968\npm.CMD
    pnpm: 9.7.1 - ~\AppData\Local\fnm_multishells\16716_1724156337968\pnpm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.19041.4355

Validations

@qmhc
Copy link
Owner

qmhc commented Aug 21, 2024

Please provide a reproduction.

@qmhc qmhc added the need reproduction Should provide a reproduction label Aug 21, 2024
@0x1f57
Copy link
Author

0x1f57 commented Aug 21, 2024

Please provide a reproduction.

The link has been updated. Please install the dependencies and run npm run build. After the build is successful, check the packages/dist/es/src/checkButton/index.d.ts file.

@qmhc
Copy link
Owner

qmhc commented Aug 22, 2024

Don't use cleanVueFileName in your case then it works. After you used cleanVueFileName there are some duplicate files make errors (index.vue.d.ts -> index.d.ts).

@0x1f57
Copy link
Author

0x1f57 commented Aug 22, 2024

Don't use cleanVueFileName in your case then it works. After you used cleanVueFileName there are some duplicate files make errors (index.vue.d.ts -> index.d.ts).

Yes, I realize that this problem will occur when index.vue and index.ts will generate index.d.ts after cleanVueFileName is set to true. But in actual projects, it is possible to have ts files and vue files with the same name in the same folder, so can we consider that in this case, even if cleanVueFileName is set to true, the correct type definition file can be generated?

@qmhc qmhc added enhancement New feature or request and removed need reproduction Should provide a reproduction labels Aug 26, 2024
@qmhc qmhc closed this as completed in 068e711 Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants