File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,8 +99,11 @@ module.exports = function (
9999 const resolveLoader = resolveMain ( localPath ( 'resolve-loader.mjs' ) ) ;
100100 cmd . unshift ( '--experimental-modules' , `--loader=${ resolveLoader } ` ) ;
101101 } else if ( semver . satisfies ( process . version , '>=12.11.1' ) ) {
102- const getSourceLoader = resolveMain ( localPath ( 'get-source-loader.mjs' ) ) ;
103- cmd . unshift ( `--experimental-loader=${ getSourceLoader } ` ) ;
102+ const loaderPath = semver . satisfies ( process . version , '>=16.12.0' )
103+ ? 'load-loader.mjs'
104+ : 'get-source-loader.mjs' ;
105+ const experimentalLoader = resolveMain ( localPath ( loaderPath ) ) ;
106+ cmd . unshift ( `--experimental-loader=${ experimentalLoader } ` ) ;
104107 }
105108 }
106109
Original file line number Diff line number Diff line change 1+ import { send } from './ipc.js' ;
2+
3+ export async function load ( url , context , defaultLoad ) {
4+ send ( { required : new URL ( url ) . pathname } ) ;
5+ return defaultLoad ( url , context , defaultLoad ) ;
6+ }
You can’t perform that action at this time.
0 commit comments