title: How to add script as a module using wp_enqueue_script WordPress
body: <p>I want to add a JavaScript module to a WordPress site. However by using <a href="https://developer.wordpress.org/reference/functions/wp_enqueue_script/" rel="nofollow noreferrer"><code>wp_enqueue_script</code></a> there is no option to set the <code>type="module"</code> in the <code>&lt;script&gt;</code> tag.</p>
  
  <pre><code>wp_enqueue_script( 'prodes-media-library-base', plugin_dir_url( __DIR__ ) . '/dist/js/classes/base.module.js', array(), '1.0' );
  </code></pre>
  
  <p>If I use the above to insert a script I cannot use <code>import</code> statement in my script. </p>