The meteor/alanning:roles package is a meteor community package and if I include it in a vanilla vue meteor 3.0.4 project then I see problems in the client build during validation that say:
UndefinedExportException: Could not import Meteor package into the client: export 'RolesCollection' is undefined
UndefinedExportException: Could not import Meteor package into the client: export 'RoleAssignmentCollection' is undefined
And a suggestion to raise an issue here (thankyou - that's a very clear steer). In development the issues can be fixed by disabling validation but this will stop a production build being created. The issue can be replicated by adding the package and then updating the imports/ui/Home.vue component to be:
<script setup>
import Hello from './Hello.vue'
import Info from './Info.vue'
import { Meteor } from 'meteor/meteor'
import { Roles } from 'meteor/alanning:roles'
import { computed } from 'vue'
const isAdmin = computed(() => Meteor.user() ? Roles.userIsInRole(Meteor.user()._id, ['admin']) : false)
</script>
<template>
<h1 class="text-3xl font-bold my-6">Welcome to Meteor!{{ isAdmin ? ' (Admin)' : ''}}</h1>
<Hello />
<Info />
</template>
The meteor/alanning:roles package is a meteor community package and if I include it in a vanilla vue meteor 3.0.4 project then I see problems in the client build during validation that say:
And a suggestion to raise an issue here (thankyou - that's a very clear steer). In development the issues can be fixed by disabling validation but this will stop a production build being created. The issue can be replicated by adding the package and then updating the imports/ui/Home.vue component to be: