Set Vue.js to production mode with Laravel

By | 2019年8月29日

When using Vue.js with Laravel, the following may be displayed on the browser console.

You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at

How to get into product mode, just run the following command in the top directory of the app. It may take some time depending on the environment.

npm run production

When this command is executed, JS and CSS are output in a compact state, and the above warning message is not displayed.

To return to the original state, do as follows.

npm run dev