victorybiz / vue-simple-acl

A simple unopinionated Vue plugin for managing user roles and permissions, access-control list (ACL) and role-based access control (RBAC).
https://github.com/victorybiz/vue-simple-acl
131 stars 24 forks source link

Using this as a plugin in Nuxt 3 breaks HMR #15

Open pnwnelson opened 1 year ago

pnwnelson commented 1 year ago

Would love to use it in a Nuxt 3 application but can't when the HMR is broken and really slows me down. There are no errors, but seeing my DOM changes requires a page reload.

zenojunior commented 1 year ago

Using with Vite, breaks too

Nymrinae commented 1 year ago

Using with Vite, breaks too

Any solution so far?

clabnet commented 1 year ago

Also for me, same issue using Vite Vue3. HMR is not available when using this as plugin. Here a repo showcase

I have also created a new npm package @clabnet/vue-simple-acl with all packages updated to vite 4.x, but the problem is the same, HMR is breaks.

@pnwnelson @zenojunior @Nymrinae Have you notice ? The author @victorybiz seems do not respond a long time ago.

Nymrinae commented 1 year ago

Have you notice ? The author @victorybiz seems do not respond a long time ago.

Yeah, the fact that it breaks HMR is a huge issue for me, I consider swapping to CASL instead but didn't try yet if it doesn't break it as well, I hope not.

clabnet commented 1 year ago

I have fixed my new npm package @clabnet/vue-simple-acl with HMR running fine. I had to completely override the build mode, it was tough but it seems to work. Try it if you can and give me your feedback, please.

Nymrinae commented 1 year ago

I have fixed my new npm package @clabnet/vue-simple-acl with HMR running fine. I had to completely override the build mode, it was tough but it seems to work. Try it if you can and give me your feedback, please.

Works fine for me, thanks a lot!!

Tob0t commented 1 year ago

Thanks @clabnet for your package, I also switched to your library now due to missing HMR. Could you maybe also push your changes to github so we know which part of the source code differs from the actual package?

psarin commented 9 months ago

Same issure here. However, in using @clabnet version, I get an error saying Module not found: Error: Can't resolve './utils' in '/node_modules/@clabnet/vue-simple-acl/dist' because origin is strict.