mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
15fb02a515
Renames the `--loader` cli argument to `--experimental-loader`. This is to clearly indicate the esm loader feature as experimental even after esm is no longer experimental. Also minorly alters the `--experimental-loader` docs to say that the passed loader can be an esm module. Refs: https://github.com/nodejs/modules/issues/351#issuecomment-535189524 PR-URL: https://github.com/nodejs/node/pull/29752 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
11 lines
403 B
JavaScript
11 lines
403 B
JavaScript
// Flags: --experimental-modules --experimental-loader ./test/fixtures/es-module-loaders/loader-shared-dep.mjs
|
|
import { createRequire } from '../common/index.mjs';
|
|
|
|
import assert from 'assert';
|
|
import '../fixtures/es-modules/test-esm-ok.mjs';
|
|
|
|
const require = createRequire(import.meta.url);
|
|
const dep = require('../fixtures/es-module-loaders/loader-dep.js');
|
|
|
|
assert.strictEqual(dep.format, 'module');
|