Skip to content

Ship a module build #58

Open
Open
@petermikitsh

Description

@petermikitsh

If you look at the latest commonJS build, you'll see this require statement:

var _reduxActions = require("redux-actions");

This imports all of redux-actions -- which doesn't sound like a lot, but they depend a lot of utilities, for example, lodash.curry -- which is 33kb. Only createAction and handleActions are imported. (A different function in the redux-actions library imports lodash.curry).

I propose we ship a module build. Module builds are just like commonjs builds, except they use ES Module import syntax -- which is important for tree-shaking.

It's 100% backwards-compatible. You'd add a "module" property to package.json to point to the ES module build. Then people using tools like rollup and webpack will get the benefits of treeshaking awesomeness.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions