WP Manifestindependent plugin directory
manifest / developer / wp-script-module-nomodule

Script module and nomodule.

Add type="module" and nomodule attributes to WordPress scripts

by Kyle Reicks · github.com/kylereicks/wp-script-module-nomodule · website

5stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/kylereicks/wp-script-module-nomodule/archive/refs/heads/master.zip

Add type="module" and nomodule attributes to WordPress scripts

wp_script_add_data( 'script-handle', 'type', 'module' );
wp_script_add_data( 'script-handle', 'nomodule', true );