Blueprint: Standalone datetime package

Created on 26 Nov 2016  路  4Comments  路  Source: palantir/blueprint

Hi!

I compared different calendar/datepicker libraries and I think yours in one of the best. Its API is simple and clean. Plus, it has a years selector (airbnb/react-dates doesn't).

Unfortunately, the core package is quite huge (> 1MB). It's the biggest package in my bundle.

Do you have any plans to make a standalone datetime package?

screen shot 2016-11-25 at 22 10 32

P3 datetime in discussion

Most helpful comment

For consumers to utilize tree shaking, we'll have to publish ES6 modules in addition to CommonJS modules (static analysis tools work much better with the former). Shouldn't be too hard; we can use tsconfig.json inheritance and create multiple folders in dist/, dist/es6/ and dist/cjs/

All 4 comments

Thanks @ggregoire! We worked hard on those datetime components, glad to hear you enjoy them as much as we do!

I can't say we have any plans to support standalone consumption. Blueprint is designed for an all-in approach where you need a lot of basic pieces to build a large application. Some judicious tree-shaking of unused code should get you pretty far in bundle size reduction, though I'm unfamiliar with how the tree is actually shaken.

For consumers to utilize tree shaking, we'll have to publish ES6 modules in addition to CommonJS modules (static analysis tools work much better with the former). Shouldn't be too hard; we can use tsconfig.json inheritance and create multiple folders in dist/, dist/es6/ and dist/cjs/

So, yeah the tree shaking thing ought to help somewhat. But Gilad is correct here, the UI kit works best when you use the core components, otherwise the app might feel pretty inconsistent. It's meant to replace packages like bootstrap, react-bootstrap, and react-overlays; after that, blueprint's bundle size feels like a bargain. Lastly, have you removed code comments in that bundle size analysis? I believe we ship dist/ with a lot of code comments (should fix that, as it's only important to have the comments in .d.ts files).

I don't think this request is physically possible as datetime relies on a number of core components.

We've done some work to reduce bundle size (#112) and are tracking future improvements (#436). Feel free to file new issues with specific requests to reduce library size.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmackerman picture dmackerman  路  46Comments

ripitrust picture ripitrust  路  19Comments

romanr picture romanr  路  67Comments

isTravis picture isTravis  路  43Comments

Binck360 picture Binck360  路  25Comments