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

EventFellows's avatar

Remove vue devtools & messages on gulp --production (specifically in Spark)

How can I remove all the development infos that vue provides in a production environment (.env="production")? Maybe I am missing something very obvious here, but I have not managed to figure it out...

When running gulp --production the css and js files get minified correctly (eventhough they are not renamed to .min). I assume that would be the right develpment step to also disable all Vue dev info in a production build.

These are the value that need to be set if I am not mistaken:

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

Where can I do that without touching the vendor files? There should also be someting out of the box in spark somewhere, right? Maybe I am missing something very obvious here...

0 likes
5 replies
Daaf's avatar

I changed the path in my gulp file to:

.browserify('app.js', null, null, { paths: 'resources/assets/js/spark' })

and added these lines to resources/assets/js/spark/vue-bootstrap.js

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

and removed from resources/assets/js/spark/vue-bootstrap.js

Vue.config.debug = true;
EventFellows's avatar

@Daaf

Just to confirm: Your resources path that you refer to 3 times is the resources in the root folder (not the one in vendor\laravel\spark\resources\), right?

I do not have these files there (they only exist in vendor folder) In resources/assets/js (referring to root folder) I only have

  • a folder components
  • a folder spark-components
  • app.js

It is a homestead install on windows (using the windows specific installation from the docs). I am wondering if that might be the reason why these files are not there...

Daaf's avatar

I think you need to run this to get those docs:

php artisan vendor:publish

JeffreyWay's avatar
Level 59

You would do:

export NODE_ENV=production && gulp --production

Or, Elixir v6 will set the environment automatically when you run gulp --production.

3 likes

Please or to participate in this conversation.