cli: use file URL for esm loader
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Fix for the new backend `start` command to make it work on Windows.
|
||||
@@ -21,7 +21,7 @@ import type { ChildProcess } from 'child_process';
|
||||
import { IpcServer } from './IpcServer';
|
||||
import { ServerDataStore } from './ServerDataStore';
|
||||
import debounce from 'lodash/debounce';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { fileURLToPath, pathToFileURL } from 'url';
|
||||
import { isAbsolute as isAbsolutePath } from 'path';
|
||||
import { paths } from '../paths';
|
||||
import spawn from 'cross-spawn';
|
||||
@@ -30,7 +30,7 @@ const loaderArgs = [
|
||||
'--require',
|
||||
require.resolve('@esbuild-kit/cjs-loader'),
|
||||
'--loader',
|
||||
require.resolve('@esbuild-kit/esm-loader'),
|
||||
pathToFileURL(require.resolve('@esbuild-kit/esm-loader')).toString(), // Windows prefers a URL here
|
||||
];
|
||||
|
||||
export async function startBackendExperimental(options: BackendServeOptions) {
|
||||
|
||||
Reference in New Issue
Block a user