mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 07:27:22 +01:00
d21a11dc23
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>
9 lines
301 B
JavaScript
9 lines
301 B
JavaScript
// Flags: --experimental-modules --loader ./test/fixtures/es-module-loaders/js-loader.mjs
|
|
/* eslint-disable required-modules */
|
|
import { namedExport } from '../fixtures/es-module-loaders/js-as-esm.js';
|
|
import assert from 'assert';
|
|
import ok from './test-esm-ok.mjs';
|
|
|
|
assert(ok);
|
|
assert(namedExport);
|