-
Notifications
You must be signed in to change notification settings - Fork 384
What are jQuery entries in webpack.client.base.config module: loaders section needed for? #185
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
Comments
This needs to change in the generators. Thanks for pointing this out @thewoolleyman. I've updated the https://github.com/shakacode/react-webpack-rails-tutorial/ with the correct config. Note, you should not be loading jquery-rails from your application.js. |
@thewoolleyman You are correct. react_on_rails has no dependency on jQuery. However, turbolinks does. If you don't use TurboLinks, feel free to remove these jQuery references. Let us know how that goes. |
Actually, it turns out I ended up needing all three of these entries in my app (except the Bootstrap 4 one, which I'm not using). This is even though I'm not using Jquery directly anywhere, nor am I using turbo links. These two seem required to avoid jquery errors in dev mode (although it may have only started showing up when I started using certain react-bootstrap components?):
...and this was required when running the app in production mode (although I'm not positive on this since I also have
|
@thewoolleyman We're moving to a new way of handling bootstrap, so it should be possible to configure all the JS to be off in bootstrap. Then you won't need jQuery. We'll have some docs on this shortly. In the meantime, here's the main config file: https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/client/.bootstraprc#L111 You can disable the bootstrap scripts there. |
@justin808 OK, thanks. I do want to use bootstrap for now, though, so I'll leave jquery enabled until the changes to not need it are available. |
BTW, I did make this PR: #163. The Webpack Dev Server didn't need jquery-ujs. |
If I comment out all the jquery references in the webpack base "module: loaders" section, nothing breaks (i.e. running
rake ci
has no failures and app works via both express and rails):react-webpack-rails-tutorial/client/webpack.client.base.config.js
Line 65 in 814671d
What are these entries necessary to support? I'm trying to understand in order to know if this should be required in my app, which doesn't use jquery directly at all, but needs it as a bootstrap-sass dependency.
Thanks,
-- Chad
The text was updated successfully, but these errors were encountered: