Skip to content

Commit 34de560

Browse files
committed
chore: move server to ts
1 parent a4dc839 commit 34de560

File tree

4 files changed

+346
-65
lines changed

4 files changed

+346
-65
lines changed

dev-server.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { execa } from 'execa'
2+
3+
if (process.env.NODE_ENV === 'production') {
4+
await import('./server')
5+
} else {
6+
const command =
7+
'tsx watch --clear-screen=false --ignore ".cache/**" --ignore "app/**" --ignore "vite.config.ts.timestamp-*" --ignore "build/**" --ignore "node_modules/**" --inspect ./server'
8+
execa(command, {
9+
stdio: ['ignore', 'inherit', 'inherit'],
10+
shell: true,
11+
env: {
12+
...process.env,
13+
},
14+
// https://github.com/sindresorhus/execa/issues/433
15+
windowsHide: false,
16+
})
17+
}

0 commit comments

Comments
 (0)