File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -524,15 +524,13 @@ let emittedLoaderFlagWarning = false;
524
524
* A loader instance is used as the main entry point for loading ES modules. Currently, this is a singleton; there is
525
525
* only one used for loading the main module and everything in its dependency graph, though separate instances of this
526
526
* 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.
528
527
* @returns {ModuleLoader }
529
528
*/
530
- function createModuleLoader ( useCustomLoadersIfPresent = true ) {
529
+ function createModuleLoader ( ) {
531
530
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 ( ) ) {
536
534
const userLoaderPaths = getOptionValue ( '--experimental-loader' ) ;
537
535
if ( userLoaderPaths . length > 0 ) {
538
536
if ( ! emittedLoaderFlagWarning ) {
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ let esmLoader;
11
11
12
12
module . exports = {
13
13
get esmLoader ( ) {
14
- return esmLoader ??= createModuleLoader ( true ) ;
14
+ return esmLoader ??= createModuleLoader ( ) ;
15
15
} ,
16
16
async loadESM ( callback ) {
17
- esmLoader ??= createModuleLoader ( true ) ;
17
+ esmLoader ??= createModuleLoader ( ) ;
18
18
try {
19
19
const userImports = getOptionValue ( '--import' ) ;
20
20
if ( userImports . length > 0 ) {
You can’t perform that action at this time.
0 commit comments