Open segevfiner opened 1 year ago
Somehow the side effect of modules should be removed.
↑ In this reproduction, the devtools
is tree-shaked. the console's log output is not always reliable.
You can check the dependency map of the build artifact.
Yes. It should be. But something in my project caused it to not be tree shaken when I updated Vite/esbuild past a certain version...
Vue devtools version
6.5.0
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-ptp8ed?file=log.txt
Steps to reproduce & screenshots
npm run build
the reproduction, or check the savedlog.txt
What is expected?
A browser build using Vite shouldn't try to bundle a Node version of
@vue/devtools
What is actually happening?
It tries to bundle the Node version. This even fails in some setups with errors such as:
System Info
Any additional comments?
This is caused by the dynamic code to figure out if running in browser or node done in
index.js
this package should migrate to package.jsonexports
instead which Vite can understand.