We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi I discovered a issue when I try to build with npm run build
npm run build
I have a vue3 installation with TypeScript, pinia and vue-router
My package.json installation is:
{ "private": true, "scripts": { "dev": "vite", "build": "vite build", "production": "npm run build", "test": "vitest", "coverage": "vitest run --coverage" }, "devDependencies": { "@tailwindcss/aspect-ratio": "^0.4.0", "@tailwindcss/forms": "^0.5.2", "@tailwindcss/line-clamp": "^0.4.0", "@tailwindcss/typography": "^0.5.4", "@vitejs/plugin-vue": "^3.0.1", "autoprefixer": "^10.4.8", "axios": "^0.27", "c8": "^7.12.0", "laravel-vite-plugin": "^0.5.0", "lodash": "^4.17.19", "postcss": "^8.4.14", "tailwindcss": "^3.1.7", "vite": "^3.0.0", "vitest": "^0.19.1" }, "dependencies": { "@headlessui/vue": "^1.6.7", "@heroicons/vue": "^1.0.6", "@sentry/tracing": "^7.8.0", "@sentry/vue": "^7.8.0", "leaflet": "^1.8.0", "pinia": "^2.0.17", "vue": "^3.2.37", "vue-router": "^4.1.3", "vue-simple-acl": "^1.2.0" } }
My configuration is:
import { storeToRefs } from 'pinia' import { createAcl, defineAclRules } from 'vue-simple-acl' import { useAuthStore } from '@/store' import router from '@/router' const rawRules = [ 'roles-list', 'roles-create', 'roles-show', 'roles-update', 'roles-delete', ] const rules = () => defineAclRules((setRule) => { const { user } = storeRefs() // setRule('users-list', (user) => user?.permissions.includes('users-list')) // setRule('users-create', (user) => user?.permissions.includes('users-create')) // setRule('users-show', (user, _user) => user?.permissions.includes('users-list') || user?.id === _user?.id) // setRule('users-update', (user, _user) => { // return user?.permissions.includes('users-update') || user?.id === _user?.id // }) // setRule('users-delete', (user, _user) => user?.permissions.includes('users-delete') || user?.id === _user?.id) // rawRules.forEach(rule => setRule(rule, (user) => user?.permissions.includes(rule))) }) export default createAcl({ user: () => storeRefs().user, rules, router, onDeniedRoute: '/unauthorized', }) const storeRefs = () => { const authStore = useAuthStore() const { user } = storeToRefs(authStore) return { user } }
The error that I got is:
Error: 'defineAclRules' is not exported by node_modules/vue-simple-acl/dist/vue-simple-acl.min.js
The status desired is: The code can be build with the command npm run build for production
The text was updated successfully, but these errors were encountered:
Please update to the latest release v2.0.1
Sorry, something went wrong.
No branches or pull requests
Hi I discovered a issue when I try to build with
npm run build
I have a vue3 installation with TypeScript, pinia and vue-router
My package.json installation is:
My configuration is:
The error that I got is:
The status desired is:
The code can be build with the command
npm run build
for productionThe text was updated successfully, but these errors were encountered: