Categories
Vue Answers

How to check if Vue.js is in development mode?

Spread the love

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.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *