dmtrKovalenko / date-io

Abstraction over common javascript date management libraries
MIT License
727 stars 90 forks source link

Treeshaking #279

Open dmtrKovalenko opened 4 years ago

dmtrKovalenko commented 4 years ago

Tree shaking could be a problem if we are talking about interpolating between the libraries! But here is a question of how we can populate the code as a couple of tree-shakable functions and still make it replaceable?

Refs: https://github.com/gpbl/react-day-picker/issues/980

ambroseus commented 4 years ago

@dmtrKovalenko also trying to find similar solution.. (hello from Chernihiv :handshake:)

ambroseus commented 4 years ago

your comment - https://github.com/gpbl/react-day-picker/issues/980#issuecomment-582283116 fully agree! but +100 for functional approach

ambroseus commented 4 years ago

have created small monorepo as sandbox: https://github.com/ambroseus/tree-shaking-adapters/blob/master/packages/adapter/src/index.ts https://github.com/ambroseus/tree-shaking-adapters/blob/master/packages/app/src/App.tsx