diff options
author | Alex Aubuchon <alex@aub.dev> | 2019-09-28 19:51:15 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-10-01 07:47:01 +0300 |
commit | 15fb02a515bf937bb1045d415dd09bfe632a463b (patch) | |
tree | 01da2627ce115a9297f4b76c489fe1321183ab39 /lib/internal/bootstrap | |
parent | 1c5a3f0d091ef34b82f89dce4c87b431cab4c3ee (diff) |
src: rename --loader to --experimental-loader
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>
Diffstat (limited to 'lib/internal/bootstrap')
-rw-r--r-- | lib/internal/bootstrap/pre_execution.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js index 6e7d946458d..cab2d47c8e3 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -400,12 +400,12 @@ function initializeESMLoader() { // track of for different ESM modules. setInitializeImportMetaObjectCallback(esm.initializeImportMetaObject); setImportModuleDynamicallyCallback(esm.importModuleDynamicallyCallback); - const userLoader = getOptionValue('--loader'); - // If --loader is specified, create a loader with user hooks. Otherwise - // create the default loader. + const userLoader = getOptionValue('--experimental-loader'); + // If --experimental-loader is specified, create a loader with user hooks. + // Otherwise create the default loader. if (userLoader) { const { emitExperimentalWarning } = require('internal/util'); - emitExperimentalWarning('--loader'); + emitExperimentalWarning('--experimental-loader'); } esm.initializeLoader(process.cwd(), userLoader); } |