-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
'Uncaught ReferenceError: jQuery is not defined' when using webpack #322
Comments
Try this:
|
I had the same problem with bootstrap-switch
and it now works without workarounds |
Thanks a lot. 👍 raulferras |
FYI, for me, provide plugin plugin works only without
Anyway, Thx 👍 |
You could also use expose-loader. The example below is written for webpack 2,
|
dgdavid
added a commit
to dgdavid/rails4-webpack2-sample-app
that referenced
this issue
Apr 2, 2018
Because in many scenarios, such as when a _.js.erb_ file is rendered, is needed to have it available globally, in order to avoid the `$ is not defined` error. More info: drgullin/icheck#322 (comment) https://github.com/webpack-contrib/expose-loader#usage
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am writing an app using Angular 2, webpack and I am using the icheck front-end library.
I am requiring them in my component thusly:
I have also tried like this:
This builds successfully using the webpack server and npm, but I get an error in the browser:
I have used this plugin before in an Angular 2 component but I never had any problems like this. I have compared the current app with the working app and I can't see any differences; it should work!
I am really up against it now and have to get this prepared for Monday. Anyone have any problems like this?
The text was updated successfully, but these errors were encountered: