Hi there, I don't know much about vuejs itself, but I wanted to use some components of primevue. Unfortunately I was unable to get the theming feature working...
I added vuejs following integrations docs
import { defineConfig } from 'astro/config';
import vue from '@astrojs/vue'
export default defineConfig({
output: 'server',
integrations: [
vue({appEntrypoint:'/src/pages/_app'}),
]
});
I created the _app.ts like this:
import { type App } from 'vue';
import PrimeVueStyled from 'primevue/config'
import Aura from '@primevue/themes/aura'
import Button from 'primevue/button';
export default (app: App) => {
app.use(PrimeVueStyled,{
theme: {
preset: Aura
}
}),
app.component('Button', Button)
};
I was unsure where the app.component part belonged so i added it in the _app and the actual page itself
---
import Layout from "../layouts/Layout.astro";
import Button from "primevue/button";
import App from './_app'
import { createApp } from "vue";
const app = createApp(App);
app.component('Button',Button)
---
<Layout title="test">
<div>
<Button icon="pi pi-home" aria-label="Save" severity="success" label="Submit"></Button>
</div>
</Layout>
this creates a button, but styling is non-existent (see screenshot)
I think this issue is related to Vite but I'm unsure.
I had my brother who knows vue way better than me look over it but he was also unable to get it to work.
I would appreciate any help