question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

problem after building a Vue 3 components library: component props suggestions never showed up after building

See original GitHub issue

Describe the bug

I am making a UI components library using Vuejs 3 but after building the library using Vite latest version the component props gone missing and never showed up in the suggestions

I am using PhpStrom as my code editor so I thought the editor could be the problem so I switched to VSCode IDE and installed the the latest version of Volar extension and the props still missing in the suggestions.

I tried to make some debugging to make sure that is the problem is related to Vite, not other things like: @vitejs/plugin-vue so I found out is it Vite related issue because when I used an older version of Vite everything worked fine

and Moon’s UI Components library creator tried to build his library using the latest version of Vite he faced the same issue as I had

I made this repo as an example project that contains the problem everything is explained in more detail in the Readme file.

Note: I tried to build the library using Windows 10 and MacBook Pro M1 Pro so I provided both of the systems info in the readme file in the example repo

Reproduction

https://github.com/yaman3bd/vue-vite-example

System Info

System:
    OS: Windows 10 10.0.19042
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 2.08 GB / 15.88 GB
  Binaries:
    Node: 14.17.1
    Yarn: 1.22.10
    npm: 6.14.13
  Browsers:
    Edge: Spartan (44.19041.1266.0), 
    Chromium (97.0.1072.62)
    Internet Explorer: 11.0.19041.1202

Used Package Manager

npm

Logs

No response

Validations

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
yaman3bdcommented, Apr 3, 2022

@bluwy it’s not working in both VSCode and PhpStrom also, I tried the latest version of volar with VSCode same thing

I tried to use Vue CLI with rollup to build the library it worked and the props and slots names are showing up

0reactions
sapphi-redcommented, May 6, 2022

Closing due to lack of response

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is Prop not applied to component in component library ...
The issue is with the modal that is not showing even though I can see the prop value is set to true.
Read more >
Why Your Vue Component Isn't Updating (and how to fix it)
1. Check that variables are reactive · 2. Make sure to update Arrays and Objects correctly (only in Vue 2) · 3. Use...
Read more >
Building a Vue 3 component library - LogRocket Blog
In this guide, you'll learn the key steps to creating a Vue 3 component library, including: Setting up a component library with Vue...
Read more >
Vue.js - The Progressive JavaScript Framework | Vue.js
An approachable, performant and versatile framework for building web user interfaces. Why Vue Get Started Install. Special Sponsor appwrite Open Source Firebase ...
Read more >
5 common problems with Vue.js - Medium
After working with Vue.js for a while I've noticed that everyone comes across the ... component relationship can be summarized as props down,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found