Skip to content
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

Update node packages and add support for JS modules #450

Open
9 tasks
parthnvaswani opened this issue Apr 9, 2024 · 0 comments · May be fixed by #451
Open
9 tasks

Update node packages and add support for JS modules #450

parthnvaswani opened this issue Apr 9, 2024 · 0 comments · May be fixed by #451
Assignees

Comments

@parthnvaswani
Copy link

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 in assets/src/js.
  • Add an example script using interactivity API in the modules folder to demonstrate the implementation of JavaScript modules in the project.
@parthnvaswani parthnvaswani self-assigned this Apr 9, 2024
@parthnvaswani parthnvaswani linked a pull request Apr 9, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant