Skip to content

Commit 0a462c1

Browse files
committed
fix: ci
1 parent 9e8981e commit 0a462c1

File tree

2 files changed

+10
-27
lines changed

2 files changed

+10
-27
lines changed

lib/index.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,20 @@ module.exports = function (
9191
function start() {
9292
isPaused = false;
9393

94-
const loaderURL = pathToFileURL(resolveMain(localPath(join('loaders', 'load.mjs'))));
94+
const args = nodeArgs.slice();
95+
96+
args.push(`--require=${resolveMain(localPath('wrap'))}`);
97+
98+
const loaderURL = pathToFileURL(resolveMain(localPath(join('loaders', `load.mjs`))));
99+
100+
if (!semver.satisfies(process.version, '>=21.0.0')) {
101+
args.push(`--experimental-loader=${loaderURL.href}`);
102+
}
95103

96104
child = fork(script, scriptArgs, {
97105
cwd: process.cwd(),
98106
env: process.env,
99-
execArgv: [
100-
...nodeArgs.slice(),
101-
`--experimental-loader=${loaderURL.href}`,
102-
`--require=${resolveMain(localPath('wrap'))}`
103-
]
107+
execArgv: args
104108
});
105109

106110
if (respawn) {

lib/loaders/get-format.mjs

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)