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

Minimal bundle size same as normal one #1844

Closed
gambolputty opened this issue Feb 5, 2019 · 8 comments
Closed

Minimal bundle size same as normal one #1844

gambolputty opened this issue Feb 5, 2019 · 8 comments
Labels
🐛 bug Unintended behavior

Comments

@gambolputty
Copy link

Versions

  • vee-validate: 2.1.7
  • vue: 2.6.2

Description
I want to install the minimal bundle of VeeValidate as described in the docs. But it has almost no effect on the bundle size after the build process (it has +1 KB compared to the bundle size after using the normal import described in the Getting Started section in the docs).

To reproduce

Minimal bundle installation:

import { Validator, install as VeeValidate } from 'vee-validate/dist/vee-validate.minimal.esm.js'
import { required } from 'vee-validate/dist/rules.esm.js'
import veeEn from 'vee-validate/dist/locale/en'
Validator.extend('required', required)
Validator.localize('en', veeEn)
Vue.use(VeeValidate)

... takes up 98.3 KB in my build file. Also my build files are the same size after normal/minimal import of VeeValidate.

Expected behavior
A smaller bundle size of VeeValidate.

Windows 10
Parcel 1.11.0 (for build process)
node 10.15.1

@ehaeusler
Copy link

I can confirm this behaviour (same version of vee-validate). It seems the bundle includes both the full build and the minimal build.

In a uglyfied build, the minimal bundle grows about 40KB in size using only 'de' localization and 4 simple rules (length, numeric, email and required).

@ansbar
Copy link

ansbar commented Mar 25, 2019

Could we get a comment about this please? See attached webpack analyzer.

image

@logaretm logaretm added the 🐛 bug Unintended behavior label Mar 25, 2019
@drewmcdonald1337
Copy link

Issue still persists. It added ~322kb to my form component.

@jondavidjohn
Copy link

I built a tool to help you analyze webpack bundles for size regressions, and report them directly to GitHub PRs. It's free for open source, so it might be worth checking out and helpful in this scenario.

https://packtracker.io

image

@kristremblay
Copy link

Has there been any movement on this?

@ddulhddul
Copy link

I need solution too,
have any plans to improve bundle size ?

@logaretm
Copy link
Owner

Addressed here #2191

@logaretm
Copy link
Owner

vee-validate is out, checkout the size improvements here: https://bundlephobia.com/result?p=vee-validate@3.0.0

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

No branches or pull requests

8 participants