Proper way install vue package using app.use?

Hi all, currently building vue component wrapping primevue package, but I notice that app.use sometime fails in dev mode, is there proper way to install the package? I tried update the component key using setTimeout onMounted but to no avail, In my case theme is sometimes not loaded.

<script>
import Aura from '@primevue/themes/aura';
import PrimeVue from 'primevue/config';

export default {
    beforeCreate: function () {
        this.$.appContext.app.use(PrimeVue, { theme: { preset: Aura } });
    },
};
</script>