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.