-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Version
6.4.3
Browser and OS info
Chrome 105 / macOS 12.6
Steps to reproduce
- Create an empty vite project
- Add
import devtools from '@vue/devtools'&if (import.meta.env.MODE === 'development') { devtools.connect() }
- Build the production build.
@vue/devtoolsdoesn't get tree shaken and gets into the production build. I have also seen cases of it importing node specific code which leads to an undefined import toemitter.
What is expected?
For it to be tree shaken so it is easy to include @vue/devtools standalone only for dev builds
What is actually happening?
It is not tree shaken
Without it being tree shaken, I will have to manually comment/uncomment it. I haven't found a way to direct it to tree shake @vue/devtools outside of modifying its package.json and adding "sideEffects": false. It still spews a huge amount of eval warnings despite this which I have no idea how to silence.
TechAkayy, bernardoadc and phlegx
Metadata
Metadata
Assignees
Labels
No labels