-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
Description
Summary:
This task involves updating node packages and integrating support for JavaScript modules in the project. This update primarily focuses on enhancing the theme scripts for the Interactivity API and ensuring compatibility with the latest dependencies. Without breaking the existing functionality.
Acceptance Criteria:
- Update package.json to include the latest dependencies without breaking the existing functionality.
- Update wp-script dependency to version 27.6.0.
- Add @wordpress/interactivity as a dependency.
- Modify scripts to include the
--experimental-modules
flag. - Configure WebpPack to enable experimental module features:
experiments: { outputModule: true, }, output: { module: true, },
- Add checks in WebPack configuration to support both module and non-module scripts.
- Implement proper enqueueing of scripts using
wp_enqueue_script_module
. - Organize the changes within Theme Elementary, placing them in a subfolder named
modules
inassets/src/js
. - Add an example script using interactivity API in the
modules
folder to demonstrate the implementation of JavaScript modules in the project.