vee-validate icon indicating copy to clipboard operation
vee-validate copied to clipboard

Vue Devtools Loaded Anyway In Production Build

Open deepdivedylan opened this issue 9 months ago • 0 comments

What happened?

I have a project built in Vue 3 and Vite in library mode. Ever since vee-validate 4.15.0, vite started emitting dist/index-[hash].js in addition to my expected project files. This broke my project's build system upstream because the dist/index-[hash].js is unnecessary and just Vue devtools. I have linked a minimally worked example that demonstrates this bug.

Reproduction steps

  1. Clone the minimally worked example.
  2. npm install
  3. npm run build
  4. Observe the presence of the superfluous dist/index-[hash].js from Vue devtools.
  5. Downgrade vee-validate to 4.14.7.
  6. rm -Rf node_modules package-lock.json
  7. npm install
  8. npm run build
  9. Observe the absence of the superfluous dist/index-[hash].js from Vue devtools.

Version

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

What browsers are you seeing the problem on?

  • [X] Firefox
  • [X] Chrome
  • [X] Safari
  • [X] Microsoft Edge

Relevant log output

# executing npm run build with vee-validate 4.15.0
$ npm run build

> [email protected] build
> vite build

vite v6.0.7 building for production...
✓ 9 modules transformed.
dist/vee-validate-lazy-devtools.js  59.37 kB │ gzip: 16.45 kB
dist/index-CKSg2LAL.js              91.23 kB │ gzip: 24.98 kB
dist/vee-validate-lazy-devtools.umd.cjs  101.02 kB │ gzip: 35.31 kB
✓ built in 389ms

# executing npm run build with vee-validate 4.14.7
$ npm run build

> [email protected] build
> vite build

vite v6.0.7 building for production...
✓ 9 modules transformed.
dist/vee-validate-lazy-devtools.js  149.12 kB │ gzip: 40.45 kB
dist/vee-validate-lazy-devtools.umd.cjs  99.72 kB │ gzip: 34.51 kB
✓ built in 375ms

Demo link

https://github.com/deepdivedylan/vee-validate-lazy-devtools

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

deepdivedylan avatar Jan 10 '25 23:01 deepdivedylan