Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue Devtools included in production bundle #4943

Closed
2 of 5 tasks
kendallroth opened this issue Nov 18, 2024 · 2 comments · Fixed by #4946
Closed
2 of 5 tasks

Vue Devtools included in production bundle #4943

kendallroth opened this issue Nov 18, 2024 · 2 comments · Fixed by #4946
Labels
🐛 bug Unintended behavior

Comments

@kendallroth
Copy link

kendallroth commented Nov 18, 2024

What happened?

When generating a production build, it appears that some Vue Devtools code is included in the build (due to VeeValidate). This is unexpected, as in production any devtools-related code should not be included (to decrease bundle size, etc). While the docs mention that the devtools are not installed in production builds, they still appear to be imported/included in bundle?

image

Reproduction steps

  1. Install and use vee-validate in a project
  2. Install rollup-plugin-visualizer (configure with sourcemaps: true)
  3. Build for production
  4. Verify that devtools-kit/dist/index.js is included in build

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

No response

Demo link

Not reproducible in CodeSandbox (requires build environment)

Code of Conduct

@logaretm logaretm added the 🐛 bug Unintended behavior label Nov 19, 2024
@logaretm
Copy link
Owner

Good catch, I think while vee-validate's code gets dropped correctly, it still bundles in the devtools code because it is imported as a dependency.

I will experiment with maybe lazy loading it because i don't want to lose the ability to auto-install the devtools plugin whenever vee-validate is used.

@kendallroth
Copy link
Author

Ah, gotcha, so VeeValidate's dev-tools related code was getting dropped, but just not the underlying (related) Vue devtools themselves...that makes a lot of sense (hadn't connected those dots before 🤦).

Agreed the the ability to auto-install the devtools plugin is super useful though; I really appreciate having the devtools integration ❤️!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants