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

Dist is full example #3

Open
dvdplm opened this issue Dec 11, 2015 · 3 comments
Open

Dist is full example #3

dvdplm opened this issue Dec 11, 2015 · 3 comments

Comments

@dvdplm
Copy link

dvdplm commented Dec 11, 2015

Hi there!
I'm looking to using this in our project and I'm wondering what the best way to add it to our project is. We're excluding node_modules/ from the JSX parsing for performance (don't want to pipe all that through Babel), which means that var Selectable = require("react-selectable"); complains about unparsed JSX.
I tried doing var Selectable = require("../../../../node_modules/react-selectable/dist/bundle.js"); but that pulls in the whole example app.

Do you think it'd be a good idea to provide a ready built JS file for people to use?

Thanks!

UPDATE: this seems like a good resource on this matter: http://chadly.net/2015/04/publishing-react-to-npm/

@lrecknagel
Copy link

I have the same issue, when I try to use it via:

import Selectable from 'react-selectable';

Can you please provide a solution for that. I read the article from dvdplm but I cant get it to work.

Kind Regards.

@unclecheese
Copy link
Owner

Yeah, I'm still trying to figure this one out. This is the first react/npm module I've released, so I'm a bit new to it.

@unclecheese
Copy link
Owner

Could this issue be solved by changing the package.json "main": "src/react-selectable.js" to point to "dist/react-selectable.js" instead?

buhuitou added a commit to wegotpop/react-selectable that referenced this issue Aug 29, 2017
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

3 participants