Auto import of Starport and StarportCarrier with Vitesse
See original GitHub issueHi,
I can get Starport to work with Vitesse if I do a manual import of Startport in each page and StarportCarrier in App.vue, however I’d like to use the unplugin-auto-import way, and I tried adding the following to AutoImport
in vite.config.ts like so:
{
'vue-starport': [
'Starport',
'StarportCarrier',
],
},
But that didn’t seem to work, so I tried the global way in main.ts like so:
import StarportPlugin from 'vue-starport'
app.use(StarportPlugin({ keepAlive: true }))
But again that didn’t work.
And I noticed that in the Starport playground demo it just has the following in main.ts:
import Starport from 'vue-starport'
...
app.use(Starport({ keepAlive: true }))
And I tried this using this in ViteSSG like so:
import StarportPlugin from 'vue-starport'
...
(ctx) => {
ctx.app.use(StarportPlugin({ keepAlive: true }))
...
But that also didn’t seem to work.
Am I missing a step with the auto import configuration somewhere? I wold rather auto import than manually do so in each page/App.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Untitled
Kroeun knhong singing, Raija malvalehto, Hd wallpaper cars 2013, Indomita game, ... Siapa eddy sumarsono, Starport leasing strafford mo, V5122p-0408, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With the app.use plugin, they we will be available globally. THere is no need to auto import.
Thanks @tangdaoyuan, your explanation makes sense.
That said, I’ve since encountered an issue where the markup on the site still says
<starportcarrier></starportcarrier>
instead of being translated into a div, i.e. the component is not actually loading properly, however there are no errors.So as a test I added
import StarportCarrier from 'vue-starport'
(and likewise forStarport
in the pages) and now I get no component rendering at all. It completely disappears from the final markup that’s generated.I think I will explore using Nuxt or something other than Vitesse for now until this issue is resolved as I really want to use Starport but not if there’s conflicts with other modules that are still works in progress that prevent it working.
Thank you for also investigating this problem, it makes me feel like I’m not going crazy! 😃