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

Pn'P + Library mode generates .vue.d.ts file with __VLS_ global types #385

Closed
3 tasks done
auirarrazaval opened this issue Sep 25, 2024 · 3 comments
Closed
3 tasks done
Labels
bug Something isn't working upstream Something about upstream packages

Comments

@auirarrazaval
Copy link

Describe the bug

Hello there!
I'm just guessing that this is again related to PnP, as I saw that there was another issue that already solved this but the error persists for me.

Upon build, an extra ....vue.d.ts file is created which declares global __VLS_-prefixed types. This generates a conflict when using the generated library in another project:

image

I have provided a link that reproduces the error, which is the same as my last issue but with the versions updated. The generated file is different than the one in the screenshot above because i just reused my previous reproduction for simplicity

Reproduction

https://github.com/auirarrazaval/vite-plugin-dts-build-error-repr

Steps to reproduce

git clone ...

In case not enabled, to use yarn4

corepack enable
yarn
yarn install
yarn sdks
yarn build

Here you can just look at the generated dist/components/atoms/typography/TText/TText.vue.d.ts and you'll see the generated types. If you were to import this as a library in another project, the error I put above rises

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 9 5900HS with Radeon Graphics
    Memory: 832.09 MB / 7.76 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 20.16.0 - /tmp/xfs-aff5ab46/node
    Yarn: 4.4.1 - /tmp/xfs-aff5ab46/yarn
    npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm

Validations

@qmhc qmhc added the bug Something isn't working label Sep 25, 2024
@qmhc
Copy link
Owner

qmhc commented Sep 25, 2024

Well, it's a issue of Volar in pnp mode ...

@qmhc qmhc added the upstream Something about upstream packages label Sep 25, 2024
@auirarrazaval
Copy link
Author

Thought it would be something on those lines. Should I open an issue directly on volar? Or do you think you have more pull with the mainteners there to get something going

qmhc added a commit that referenced this issue Sep 30, 2024
@qmhc qmhc closed this as completed in 3bc780a Sep 30, 2024
@qmhc
Copy link
Owner

qmhc commented Sep 30, 2024

I just added a patch for this, and waiting it's fixed in Volar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Something about upstream packages
Projects
None yet
Development

No branches or pull requests

2 participants