Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

douglas_quaid's avatar

How to disable vue js development tools production

Hi Everyone,

I'm using Laravel Spark and I'm trying to figure out how to disable vue js dev tools for production mode. I've done a ton of research and I actually have gotten it to work on my local environment by adding the following to resources/assets/js/app.js

Vue.config.devtools = false
Vue.config.debug = false
Vue.config.silent = true

This works and it says vue inspector tools are disabled. However, when I deploy to production with the exact same code to Heroku, the vue inspector tools are still enabled. Why is this? I can' figure out why this is the case on my production environment. Any thoughts on how to fix this?

Thanks!

0 likes
4 replies
douglas_quaid's avatar

Thanks @willvincent. The problem was that it had to be declared after app declaration like so

require('spark-bootstrap');

require('./components/bootstrap');

var app = new Vue({
    mixins: [require('spark')]
});

Vue.config.devtools = false
Vue.config.debug = false
Vue.config.silent = true

I was calling it before.

=/

willvincent's avatar

Ideally you should probably keep that Vue instance anonymous... in other words, omit the var app =

Please or to participate in this conversation.