mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 23:17:19 +00:00

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>
9 lines
399 B
JavaScript
9 lines
399 B
JavaScript
// Flags: --experimental-modules --experimental-loader ./test/fixtures/es-module-loaders/missing-dynamic-instantiate-hook.mjs
|
|
import { expectsError } from '../common/index.mjs';
|
|
|
|
import('test').catch(expectsError({
|
|
code: 'ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK',
|
|
message: 'The ES Module loader may not return a format of \'dynamic\' ' +
|
|
'when no dynamicInstantiate function was provided'
|
|
}));
|