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

ES6 import #29

Closed
mrondra opened this issue Feb 14, 2017 · 3 comments
Closed

ES6 import #29

mrondra opened this issue Feb 14, 2017 · 3 comments

Comments

@mrondra
Copy link

mrondra commented Feb 14, 2017

Hello,

how to import it to ES6? I'm getting error that jQuery is not defined, but I'm importing it before rowGrid.

This is my import:
import $ from "jquery";
import rowGrid from 'rowgrid.js';

Thanks for reply.
Ondra

@brunjo
Copy link
Owner

brunjo commented Feb 14, 2017

The name of the jQuery object shouldn't be $ but jQuery. Try to import jQuery like this: import jQuery from 'jquery';. Maybe you also have to make the jQuery object globally available: window.jQuery = jQuery;.

@mrondra
Copy link
Author

mrondra commented Feb 15, 2017

It didn't help, I had to move all the code into my js file.

@mrondra
Copy link
Author

mrondra commented Feb 17, 2017

Solved, I had to add ProvidePlugin to webpack

@mrondra mrondra closed this as completed Feb 17, 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

2 participants