problem after building a Vue 3 components library: component props suggestions never showed up after building
See original GitHub issueDescribe 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
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
@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
Closing due to lack of response