Sometimes, we want to check if Vue.js is in development mode.
In this article, we’ll look at how to check if Vue.js is in development mode.
How to check if Vue.js is in development mode?
To check if Vue.js is in development mode, we can check the value of process.env.NODE_ENV
.
For instance, we write
process.env.NODE_ENV === "development";
to check if process.env.NODE_ENV
is 'development'
to see if the app is running in development mode.
Conclusion
To check if Vue.js is in development mode, we can check the value of process.env.NODE_ENV
.