Riff / Built on the open web / Platform

ES modules

The shipped file is the source, loaded as a module with no build step.

A post with its tracks listed, and the player bar along the bottom of the screen
A post with the player attached by one module script; without it the blocks still play natively.

How Riff uses it

The player is enqueued through WordPress's wp_enqueue_script_module(), so it loads as <script type="module">, deferred by default. The Listen app is a separate module with a named export that the player imports on demand. There is no bundler.

Why

Modules give deferred loading, strict mode and a real import for the optional app without a build step.

Without it

A browser without modules skips the script, and the native audio blocks still play.

Where

Links open the source at the commit this page was published from.

Reference: ES modules on MDN.