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

Target lib with ts components doesn't generate types #5552

Open
gehringf opened this issue Jun 4, 2020 · 0 comments
Open

Target lib with ts components doesn't generate types #5552

gehringf opened this issue Jun 4, 2020 · 0 comments

Comments

@gehringf
Copy link

gehringf commented Jun 4, 2020

Version

4.4.1

Reproduction link

https://github.com

Environment info

Environment Info:

  System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
  Binaries:
    Node: 11.10.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.14.5 - /usr/local/bin/npm
  Browsers:
    Chrome: 83.0.4103.61
    Edge: Not Found
    Firefox: Not Found
    Safari: 12.1.2
  npmGlobalPackages:
    @vue/cli: 4.4.1

Steps to reproduce

  • vue create projectxy
  • Choose typescript
  • Add typescript components with modern decorator syntax
  • Add index.js which exports the components
  • run vue-cli-service build --target lib

What is expected?

Export contains a ts file for the types of the components

What is actually happening?

Trying to consume the components in another vue project with ts doesn't work because the types are missing.


I haven't been able to find out how big libraries are doing this right now? Are they manually writing the type declarations?

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

No branches or pull requests

1 participant