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

Library is not tree-shakeable #196

Closed
unindented opened this issue Dec 7, 2018 · 0 comments
Closed

Library is not tree-shakeable #196

unindented opened this issue Dec 7, 2018 · 0 comments

Comments

@unindented
Copy link
Contributor

This library does not have a "module" entry in its package.json pointing to an ESM build, and it doesn't have a "sideEffects" declaration in its package.json, so it's not possible for Webpack to do any tree-shaking optimizations on it. The end result in my app is that a single import like this one pulls the whole library:

import { routerMiddleware } from 'connected-react-router';

You can see react-router properly configured with these two lines: https://github.com/ReactTraining/react-router/blob/447394fbf79116c7d7283ababa90b0289fb0290f/packages/react-router/package.json#L30-L31

@supasate would you be open to merging a PR that fixes this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant