All of our products does not contain 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 Jet HTML Free.
Remove jQuery
Locate the package.json file within the tools folder: /theme/html/tools/
Find jQuery within the list of dependencies
Delete jQuery from the list
Locate all plugins within the list of dependencies 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
Delete all jQuery plugins from the list and re-run yarn
Gulp Config
Locate the gulp config file within the tools folder: /theme/html/tools/gulp.config.js
Find jQuery within the list of mandatory plugins
Delete the entire jQuery object from the list
Locate all plugins within the gulp.config.js file 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
Delete the entire plugin object from the list and re-run gulp
Webpack Config
Locate the webpack config file within the tools folder: /theme/html/tools/webpack/plugins/plugins.js
Find jQuery within the list of mandatory plugins
Delete the entire jQuery variable from the file
Locate all plugins within the plugins.js file 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
Delete the entire plugin object from the list and re-run npm run build