V-calendar: Lightweight

Created on 17 May 2019  路  3Comments  路  Source: nathanreyes/v-calendar

Just an observation - the description states that this is a lightweight calendar library, but bundlephobia reports it's actually pretty large compared to other dependency free date pickers out there.

If you could treeshake stuff away, then it'd be fair to state it's lightweight, otherwise I think it's a bit misleading to developers actually looking for a lightweight date picker IMO. Or is bundlephobia misreporting the size?

image

Most helpful comment

Would at least be possible to split the umd minified version (https://unpkg.com/[email protected]/lib/v-calendar.umd.min.js) without poper and styles? eg. v-calendar.umd.min.js, v-calendar.umd.all.min.js Similiar uproach is done in tippyjs where poper is not included, but required and styles are only in .all.min.js.

That would save a few kbs, when served via cdn

All 3 comments

I think that it would be fair to say it isn't exactly lightweight. That wording was specifically applied for versions before v1.0.0-beta.0 that I never really revisited, so I will definitely revisit that.

A couple of points to note:

  • The bulk of the size is when using the date picker because not only does it import more components, it also uses Popper.js under the hood for positioning
  • All CSS is inlined, so there isn't any separate CSS file that needs importing. Not sure how the other components handle that or if bundlephobia is looking at that as well.
  • There are features that v-calendar supports that the others don't. Not saying that is a bad thing at all, but something to consider.

One tip is to just import the Calendar component itself and ignore the date picker completely. I know lots of people who do that just because they want to use the attributes.

I would like to explore trying to use async components, especially for the using popovers for anything. However, I've experienced some bugs with that approach that still need to be worked out.

For now, just updated the site wording to 'modern and flexible' :)

Would at least be possible to split the umd minified version (https://unpkg.com/[email protected]/lib/v-calendar.umd.min.js) without poper and styles? eg. v-calendar.umd.min.js, v-calendar.umd.all.min.js Similiar uproach is done in tippyjs where poper is not included, but required and styles are only in .all.min.js.

That would save a few kbs, when served via cdn

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Maadtin picture Maadtin  路  3Comments

jeffster9 picture jeffster9  路  3Comments

bocanhcam picture bocanhcam  路  3Comments

maksnester picture maksnester  路  3Comments

felixfrtz picture felixfrtz  路  3Comments