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

Exported bundle is requiring 'React' instead of 'react' #2

Closed
thibaudcolas opened this issue Jan 14, 2016 · 2 comments
Closed

Exported bundle is requiring 'React' instead of 'react' #2

thibaudcolas opened this issue Jan 14, 2016 · 2 comments

Comments

@thibaudcolas
Copy link
Contributor

There's weirdness in the exported bundle because of rackt-cli's Webpack configuration (React package name):

module.exports = factory(require("React"));

https://github.com/springload/react-svg-icon/blob/master/dist/react-svg-icon.js#L3

This is causing issues with my build using browserify: Cannot find module 'React' from [...]/node_modules/react-svg-icon/dist', and as a consequence the bundle contains React twice (under React and react), increasing the minified size by 20kb.

It's because of mzabriskie/rackt-cli#18. What should we do to fix this?

@thibaudcolas
Copy link
Contributor Author

I think that a simple fix for this might be to change the package.json's main to build/lib/index.js (and commit that folder) so that we export the CommonJS build instead of the UMD one.

@thibaudcolas
Copy link
Contributor Author

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