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

When is it required to use require rather than module/import with npm libraries? #8

Open
justin808 opened this issue Aug 30, 2014 · 2 comments

Comments

@justin808
Copy link

I get this error when loading jQuery:

CommentBox.jsx:25 imported module '$' exported a function - this may not work as expected

Here's how I'm loading the modules:

module React from 'react';
import { CommentBox } from './CommentBox';
var $ = require('jquery');

I'm also curious as to why React supports "module", but jQuery does not.

@justin808 justin808 changed the title When is should we use require? When is it required to use require rather than module/import with npm libraries? Aug 30, 2014
@shama
Copy link
Owner

shama commented Aug 30, 2014

Which jquery library and version are you using? Installed via npm https://www.npmjs.org/package/jquery ?

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