Gist bd978df74840af0f424ab50974f8489a
✓ Published0🌍 Public
KKopylovVitalik
Last edited Apr 15, 2020
Created on Apr 15, 2020
This example demonstrates how to integrate a specific version of jQuery with WordPress and Webpack. It shows two configuration steps: first, deregistering the default WordPress jQuery in `functions.php` via `wp_deregister_script` and an `init` action, and second, excluding jQuery from the bundle using `externals` in `webpack.config` while injecting it with `webpack.ProvidePlugin`. The code also references registering a newer jQuery version through WordPress hooks.
AI-generated description