cli: add esm loader for exterminal backend start

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Johan Haals <johan.haals@gmail.com>
Co-authored-by: Camila Belo <camilaibs@gmail.com>
Co-authored-by: Philipp Hugenroth <philipph@spotify.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-09-06 15:34:00 +02:00
parent d15cb1c54a
commit 4d5eeec52d
4 changed files with 23 additions and 1 deletions
@@ -25,7 +25,12 @@ import debounce from 'lodash/debounce';
import spawn from 'cross-spawn';
import { paths } from '../paths';
const loaderArgs = ['--require', require.resolve('@esbuild-kit/cjs-loader')];
const loaderArgs = [
'--require',
require.resolve('@esbuild-kit/cjs-loader'),
'--loader',
require.resolve('@esbuild-kit/esm-loader'),
];
export async function startBackendExperimental(options: BackendServeOptions) {
const envEnv = process.env as { NODE_ENV: string };