devtools icon indicating copy to clipboard operation
devtools copied to clipboard

@vue/devtools always included in the bundle for the production

Open cawa-93 opened this issue 5 years ago • 3 comments

Version

5.1.0

Browser and OS info

Chrome 74 / MacOS

Steps to reproduce

// entry.js
import devtools from '@vue/devtools' // Just import devtools without anything else

What is expected?

I was expecting that the bundle file would be empty.

What is actually happening?

The bundle includes a @vue/devtools library


This also leads to the fact that this module is included in the production bundle even in this scenario.

import devtools from '@vue/devtools'
import Vue from 'vue';

 if (process.env.NODE_ENV === 'development') {
   devtools.connect(/* host, port */)
 }

cawa-93 avatar May 30 '19 10:05 cawa-93

Push! I can report the same ... 273 kb ... that's a lot ...

qhantom avatar Jul 22 '21 13:07 qhantom

Any guidance on this? It's adding 450 KiB to prod 😅

CallumWatkins avatar Jul 23 '22 01:07 CallumWatkins

Any guidance on this? It's adding 450 KiB to prod 😅

I ended up uninstalling it ...

qhantom avatar Jul 23 '22 08:07 qhantom