mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
fix(cli): run dev-web crash
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"bin": {
|
||||
"dev-web": "./src/dev.mts"
|
||||
"dev-web": "./src/dev.mjs"
|
||||
},
|
||||
"scripts": {
|
||||
"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