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

Provide more minimal export #1223

Closed
ashaffer opened this issue Jan 10, 2016 · 2 comments
Closed

Provide more minimal export #1223

ashaffer opened this issue Jan 10, 2016 · 2 comments

Comments

@ashaffer
Copy link
Contributor

This isn't a huge deal because redux is pretty small, but i'm working on vdux, which currently wraps redux and only uses a small portion of the bundled API. At the moment, redux is my single largest dependency, and i'm only really using applyMiddleware and createStore.

Requiring only those files, like this:

import applyMiddleware from 'redux/lib/utils/applyMiddleware'
import createStore from 'redux/lib/createStore'

Reduces the size of the redux dep to about 1/4 of what it is normally. I can just do this for now, but it feels sort of unsupported and like something that may break in the future, unannounced. What i'd like is to be able to have an official thing like:

import {applyMiddleware, createStore} from 'redux/core'

So that people like me who aren't using the other helper functions can avoid the bloat.

@gaearon
Copy link
Contributor

gaearon commented Jan 10, 2016

What we should do is move all top-level exports to src from src/utils. We will support importing from lib/ folder directly for top-level exports. Want to make a PR for that?

@ashaffer
Copy link
Contributor Author

PR'd: #1224

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

2 participants