Documentation v1.0.11

Preview Purchase

Overview

All of our products does notcontain any jQuery within the core components. However, there are still some plugins that requires it, such as Select2 (and others), which is the main reason for jQuery's inclusion.
To check if a plugin requires jQuery, please refer to the plugin's official documentation and look for any indication of jQuery.
A quick hint to detect jQuery is, if the plugin syntax includes $(...), then it's a high possibility that the plugin requires jQuery
Here's a quick 3 step how-to to completely remove jQuery from Craft.

Remove jQuery from package.json

  • Locate the package.jsonfile within the tools folder: /theme/html/tools/
  • Find jQuerywithin the list of dependencies
Remove plugins from package.json
  • Delete jQueryfrom the list
  • Locate all plugins within the list of dependenciesthat requires jQuery to run
  • For example: Select2 requires jQuery
  • Note: To check if a plugin requires jQuery, please refer to the plugin's official documentation and look for any indication of jQuery. Usually if the plugin syntax includes $(...), it's a high possibility that the plugin requires jQuery
Remove plugins from package.json
  • Delete all jQuery plugins from the list and re-run yarn

Remove jQuery from Gulp config

  • Locate the gulp config file within the tools folder: /theme/html/tools/gulp.config.js
  • Find jQuerywithin the list of mandatoryplugins
Remove jquery from gulp config
  • Delete the entire jQueryobject from the list
  • Locate all plugins within the gulp.config.jsfile that requires jQuery to run
  • For example: Select2 requires jQuery
  • Note: To check if a plugin requires jQuery, please refer to the plugin's official documentation and look for any indication of jQuery. Usually if the plugin syntax includes $(...), it's a high possibility that the plugin requires jQuery
Remove plugins from gulp config
  • Delete the entire plugin object from the list and re-run gulp

Remove jQuery from Webpack

  • Locate the webpack config file within the tools folder: /theme/html/tools/webpack/plugins/plugins.js
  • Find jQuerywithin the list of mandatoryplugins
Remove jquery from webpack
  • Delete the entire jQueryvariable from the file
  • Locate all plugins within the plugins.jsfile that requires jQuery to run
  • For example: Select2 requires jQuery
  • Note: To check if a plugin requires jQuery, please refer to the plugin's official documentation and look for any indication of jQuery. Usually if the plugin syntax includes $(...), it's a high possibility that the plugin requires jQuery
Remove plugins from webpack
  • Delete the entire plugin object from the list and re-run npm run build
Learn & Get Inspired

Support at devs.keenthemes.com

Join our developers community to find answer to your question and help others. FAQs
Get Support
Documentation
From guides and how-tos, to live demos and code examples to get started right away.
Plugins & Components
Check out our 300+ in-house components and customized 3rd-party plugins.
Layout Builder
Build your layout, preview it and export the HTML for server side integration.
What's New
Latest features and improvements added with our users feedback in mind.
Buy now