File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -524,15 +524,13 @@ let emittedLoaderFlagWarning = false;
524524 * A loader instance is used as the main entry point for loading ES modules. Currently, this is a singleton; there is
525525 * only one used for loading the main module and everything in its dependency graph, though separate instances of this
526526 * class might be instantiated as part of bootstrap for other purposes.
527- * @param {boolean } useCustomLoadersIfPresent If the user has provided loaders via the --loader flag, use them.
528527 * @returns {ModuleLoader }
529528 */
530- function createModuleLoader ( useCustomLoadersIfPresent = true ) {
529+ function createModuleLoader ( ) {
531530 let customizations = null ;
532- if ( useCustomLoadersIfPresent &&
533- // Don't spawn a new worker if we're already in a worker thread created by instantiating CustomizedModuleLoader;
534- // doing so would cause an infinite loop.
535- ! require ( 'internal/modules/esm/utils' ) . isLoaderWorker ( ) ) {
531+ // Don't spawn a new worker if we're already in a worker thread created by instantiating CustomizedModuleLoader;
532+ // doing so would cause an infinite loop.
533+ if ( ! require ( 'internal/modules/esm/utils' ) . isLoaderWorker ( ) ) {
536534 const userLoaderPaths = getOptionValue ( '--experimental-loader' ) ;
537535 if ( userLoaderPaths . length > 0 ) {
538536 if ( ! emittedLoaderFlagWarning ) {
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ let esmLoader;
1111
1212module . exports = {
1313 get esmLoader ( ) {
14- return esmLoader ??= createModuleLoader ( true ) ;
14+ return esmLoader ??= createModuleLoader ( ) ;
1515 } ,
1616 async loadESM ( callback ) {
17- esmLoader ??= createModuleLoader ( true ) ;
17+ esmLoader ??= createModuleLoader ( ) ;
1818 try {
1919 const userImports = getOptionValue ( '--import' ) ;
2020 if ( userImports . length > 0 ) {
You can’t perform that action at this time.
0 commit comments