Reputation: 981
How can I use isDev within my plugin?
Unfortunately I do not understand how to use it. Link to context documentation
This is what I tried:
export default function({ $axios, redirect, req }) {
if (context.isDev) (
console.log('Running as dev')
...
)
How can I acces isDev?
Upvotes: 0
Views: 136
Reputation: 981
Solved it.
export default function({ $axios, redirect, req, isDev }) {
if (isDev) (
console.log('Running as dev')
...
)
Just add isDev to your parameters. (Because it is within the context)
Upvotes: 1