You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build the project using the scripts provided by the above repos
Create a client project to consume the library using Vite or vue-cli
Import the library (I just npm installed from the local file system)
Add the library to the app using app.use(...)
Attempt to use a component from the library you just created with slot data
What is expected?
the slots are populated with the content you provide
What is actually happening?
nothing - the slot is never populated, also styles disappear - but i think that's probably a different problem
I've noted that when running on Vite - it works as expected in Development mode, but not when it's built. It doesn't work at all on a project generated by vue-cli
Slot data is still rendered if you use a pure .ts component with a render function - this only appears to affect Single File Components
I've run the same repo steps above using Vue 2 and confirmed everything works.
I can't be absolutely certain that it's not the fault of the above libraries - but vue-rollup-sfc produces working slots when used with Vue 2
The text was updated successfully, but these errors were encountered:
Open an issue in the two repositories or open an issue that doesn't use those repositories. If the bug is within vue compiler, you should be able to use https://sfc.vuejs.org to generate the js and copy paste on the same website to create sharable reproduction
I haven't checked your repo in detail but from the symptoms I suspect you're pulling in two copies of Vue. See #2064 (comment) for a possible solution.
Turns out it was because of how I was installing my library locally - if I npm pack my library and then install the resulting .tgz file it works perfectly
Version
3.1.4
Reproduction link
https://github.com/loadpixels/slots-example
Steps to reproduce
What is expected?
the slots are populated with the content you provide
What is actually happening?
nothing - the slot is never populated, also styles disappear - but i think that's probably a different problem
I've noted that when running on Vite - it works as expected in Development mode, but not when it's built. It doesn't work at all on a project generated by vue-cli
Slot data is still rendered if you use a pure .ts component with a render function - this only appears to affect Single File Components
I've run the same repo steps above using Vue 2 and confirmed everything works.
I can't be absolutely certain that it's not the fault of the above libraries - but vue-rollup-sfc produces working slots when used with Vue 2
The text was updated successfully, but these errors were encountered: