{"push_id":1022787039,"size":1,"distinct_size":1,"ref":"refs/heads/reduced-bloat-npm-module","head":"7a13eb2d1bcf1e5f99aecf0a0cce729effae37b1","before":"d73c93ab2475e7cb865f456705a47fdf82c154de","commits":[{"sha":"7a13eb2d1bcf1e5f99aecf0a0cce729effae37b1","author":{"email":"0a9be5f74f3fe2193f61e0d8dac774333bfc2d8e@flexport.com","name":"Desmond Brand"},"message":"Reduced-bloat packaging for npm & webpack\n\n`react-datepicker`'s npm module has a main file\n`./dist/react-datepicker.min.js`. This file is built by webpack, so it\ninlines both `classnames` and `react-tether` dependencies.\n\nThe `classnames` and `react-tether` dependencies in package.json are\nhence unused by consumers of `react-datepicker`. Right now they'd be\nmore appropriate in devDependencies. But this commit proposes another\nsolution.\n\nI'm using `react-datepicker` with npm, and importing via webpack. My app\nalso uses `classnames`, and could presumably use `react-tether` too. But\nsince these `react-datepicker` dependencies are inlined, they cannot be\nshared with the host application, despite being present in package.json.\n\nThis commit proposes that the main file for distribution via npm is\n`./lib/datepicker.js`, compiled by Babel, but not webpack. This allows\nusers of `react-datepicker` to share the same version of `classnames`\nand `react-tether` with `react-datepicker`.","distinct":true,"url":"https://api.github.com/repos/dmnd/react-datepicker/commits/7a13eb2d1bcf1e5f99aecf0a0cce729effae37b1"}]}