cli: tweak check for when to use module register API
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Tweaked Node.js version check for when to use the new module register API with the new backend `package start` command.
|
||||
@@ -28,7 +28,8 @@ import { paths } from '../paths';
|
||||
import spawn from 'cross-spawn';
|
||||
|
||||
const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(Number);
|
||||
const supportsModuleLoaderRegister = nodeMajor >= 20 && nodeMinor >= 6;
|
||||
const supportsModuleLoaderRegister =
|
||||
nodeMajor > 20 || (nodeMajor === 20 && nodeMinor >= 6);
|
||||
|
||||
const loaderArgs = [
|
||||
'--require',
|
||||
|
||||
Reference in New Issue
Block a user