This enables a --loader flag for Node, which can provide custom "resolve" and "dynamicInstantiate" methods for custom ES module loading. In the process, module providers have been converted from classes into functions and the module APIs have been made to pass URL strings over objects. PR-URL: https://github.com/nodejs/node/pull/15445 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
6 lines
211 B
JavaScript
6 lines
211 B
JavaScript
// Flags: --experimental-modules --loader ./test/fixtures/es-module-loaders/example-loader.mjs
|
|
/* eslint-disable required-modules */
|
|
import assert from 'assert';
|
|
import ok from './test-esm-ok.mjs';
|
|
|
|
assert(ok);
|