Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

I need to disable Vue.js devtools for production mode but it should be enabled for development mode

$
0
0

I don’t want my users to inspect the app using devtools so I would like to disable it in the production mode. But I need it in local/development mode. I have tried the below but it is not working.

I have created .env and .env.production files with a variable VUE_APP_ROOT_API

.env file

VUE_APP_ROOT_API=http://localhost

.env.production

VUE_APP_ROOT_API=https://prod.com

in webpack configuration, I have added below

devtool: process.env.VUE_APP_ROOT_API === ‘PROD’ ? ‘source-map’ : ‘’

Please help me.


Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>