Nuxt 2: Deactivate/Activate Plugin for certain pages
See original GitHub issueI would like to activate the plugin only for certain pages.
Best would be to enable or disable it inside the export default {}
of the pages, or by having a function in the nuxt.config settings that return the pages for which the plugin should be activated.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
How can I turn off SSR for only certain pages in Nuxt.js to use ...
You could do that via server middleware export default function(req, res, next) { const paths = ['/', '/a'] if (paths.includes(req.
Read more >Configuration - Nuxt
Nuxt lets you define the CSS files/modules/libraries you want to set globally (included in every page). In case you want to use sass...
Read more >Nuxt configuration file
You can customize the path by using --dotenv <file> or disable entirely with ... the context in your pages, store, components and plugins...
Read more >Modules directory - Nuxt
Thanks to Nuxt's modular design (based on webpack's Tapable ), modules can easily register hooks for certain entry points like the builder initialization....
Read more >Built-in Components - Nuxt
To import a component only on the client, register the component in a client-side only plugin. pages/example.vue <template> <div> ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for letting me know, I chose not to include this for Nuxt v2 due to the effort involved.
I’ve re-opened the issue as I may re-consider it, but at this stage, I have other priorities to work on sorry.
Same here. I am only using nuxt-2