Skip to content

module: improve support of data: URLs

Add support for loading modules using percent-encoded URLs.

This makes Node.js implementation closer to the browsers' one. On the browser the following snippet prints Hello, World! to the console:

import("data:text/javascript,console.log%28%27Hello%2C%20World%21%27%29%3B");

On Node.js, it thorws an error: SyntaxError: Invalid or unexpected token. This PR fixes that.

Merge request reports

Loading