-
Notifications
You must be signed in to change notification settings - Fork 615
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
Feature Request: move off of jquery in order to decrease load time and bundle size #2163
Comments
That reduction would be great. I also noticed that the built in Data solution for Visual Website Optimizer loads a separate copy of jquery and the rebillia code is dependent on it. In total it makes three blocking requests for JavaScript early in the head section. I have one client that loads 4 different versions of jQuery (including the one in the bundle)! |
I think it will be huge effort to completely deprecate jQuery in Cornerstone. jQuery is not just dom ready, but also selectors, ajax calls, other events that are used across whole theme. |
Yeah I realize this is "pie in the sky" but, it would be great to start moving away from it, definitely think with all of the modern tech in the project it would be a lot easier. Less of a lift would be to move off of Lodash since the number of calls to it are obvious and pretty limited to a handful of simple methods like |
We checked |
Reduced lodash usage a little with #2256 |
I've heard rumors that performance is on the roadmap for '23? Curious if that means cornerstone as well. Honestly, it seems like this would be an impossible task to modify and refit the current version of the theme. Wondering if it would be better to approach would be to just build a simpler new theme that is more developer friendly and framework independent. Remove multiple versions, Zurb, widgets, and theme editor bits. We're currently floating this idea and I'd love to make the project public but, not sure if the org will go for that. If we do I'll be sure to follow up. my .02c at the moment if anyone is interested 😁 |
Feature Request: Deprecate jQuery
Since we have webpack & polyfills you could move off of requiring jQuery since it increases the bundle size by 100K (even more if you can get rid of lodash (mostly using _.get & filter?)
Comparison when removing the app.js / webpack entry that injects jQuery
bundle: 5.1K
chunk: 2.8K
With JQuery (and granted a lot of other theme files)
Steps to reproduce behavior
Some code I've created using vanilla JS:
The text was updated successfully, but these errors were encountered: