disabling a module for a page (or for a layout)
I have a project which for our unauthenticated pages use a bootstrap theme/layout, but for our secure area the idea is to use nuxt ui which leverages tailwind.
Nuxt ui is loaded via the nuxt config's
modules: ["@nuxt/ui"],
, and unfortunately, it's loading css globally that messes with the bootstrap layout.
Any potential solutions/workarounds for this? I'd sure love to save myself from having to split the project over this π
Eventually we can redo everything so it's all on tailwind but, if I can find a way to make them play nice for now, it would be a real help.3 Replies
It's a bit hacky but the easiest bet would be a nitro hook to remove the nuxt ui styles for the pages you don't want it on
I doubt the module would support this functionality, although feel free to make an issue
Nuxt
Lifecycle Hooks Β· Nuxt Advanced
Nuxt provides a powerful hooking system to expand almost every aspect using hooks.
hmm seems like it would be such a nice feature for the framework to allow natively, asking third party devs for something like this feels odd, imagine every plugin dev having to do something of the sort
ive opted for a less elegant workaround but should suffice for now (post-render removal of the styles via mounted method)