-
Notifications
You must be signed in to change notification settings - Fork 759
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
(index):72 Uncaught ReferenceError: $ is not defined #185
Comments
I was getting the same error using the eonasdan-bootstrap-datetimepicker widget. I tried several things, including adding the last two lines here to the ProvidePlugin section of webpack.config.js: new webpack.ProvidePlugin({ $: 'jquery',
jQuery: 'jquery',
'window.$': 'jquery',
'window.jQuery': 'jquery' }), The only thing that actually worked, however, was changing window.$ = window.jQuery = require('jquery'); This might not be ideal, though. Does anyone have a better solution? |
I was able to get this resolved by adding the expose-loader, and specifying this as the loader in the exports:
And then in
|
This worked for me and seems like a much cleaner solution. Thanks, @dylanjnz ! |
Closing, as this issue is stale. Feel free to reopen or comment if there's still an issue. |
The text was updated successfully, but these errors were encountered: