fix(cli): run dev-web crash
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"dev-web": "./src/dev.mts"
|
"dev-web": "./src/dev.mjs"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "ts-node-esm ./src/dev.mjs"
|
"start": "ts-node-esm ./src/dev.mjs"
|
||||||
|
|||||||
16
packages/cli/src/dev.mjs
Executable file
16
packages/cli/src/dev.mjs
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
import { spawnSync } from 'node:child_process';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
|
|
||||||
|
const child = spawnSync(
|
||||||
|
process.execPath,
|
||||||
|
[
|
||||||
|
'--loader',
|
||||||
|
'ts-node/esm/transpile-only',
|
||||||
|
fileURLToPath(new URL('./dev.ts', import.meta.url)),
|
||||||
|
...process.argv.slice(2),
|
||||||
|
],
|
||||||
|
{ stdio: 'inherit' }
|
||||||
|
);
|
||||||
|
|
||||||
|
if (child.status) process.exit(child.status);
|
||||||
Reference in New Issue
Block a user