devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Need simple official solution to add devtools for production application.

Open apuatcfbd opened this issue 1 year ago • 5 comments

What problem does this feature solve?

This is really frustrating that Vue 3 doesn't have official/documented way to enable dev tools for production build. So @VueJS tell me what I do now. I'm having an issue with my app only after production build. I failed to produce this in development.

???

apuatcfbd avatar May 02 '23 09:05 apuatcfbd

@apuatcfbd I just followed this guide recently, it worked great!

https://mokkapps.de/vue-tips/force-enable-vue-devtools-in-production-build/

dj12djdjs avatar May 03 '23 21:05 dj12djdjs

@apuatcfbd I just followed this guide recently, it worked great!

https://mokkapps.de/vue-tips/force-enable-vue-devtools-in-production-build/

@dj12djdjs this is a hack, not an official solution

apudiu avatar May 05 '23 00:05 apudiu

You can try this solution: https://github.com/vuejs/devtools/issues/1321

Set __VUE_PROD_DEVTOOLS__ true in the production build can enable the access to the devtool.

Azurewarth0920 avatar Aug 13 '23 07:08 Azurewarth0920

If you use vite this is a simple solution

// vite.config.js
import { defineConfig } from 'vite'

export default defineConfig({
  define: {
    __VUE_PROD_DEVTOOLS__: true
  }
})

chubetho avatar Apr 13 '24 12:04 chubetho