fix(scripts/dev): make --prod actually work

This commit is contained in:
PalmDevs 2025-07-04 22:15:03 +07:00
parent c067dc520d
commit 9ff945b752
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -23,8 +23,8 @@ const Sources = [
].map(cwdify)
const ExitTriggers = ['scripts'].map(cwdify)
const debouncedBuildDev = debounce(
() => ((needRebuild = false), build(true)),
const debouncedBuild = debounce(
() => ((needRebuild = false), build(!prod)),
250,
)
@ -47,7 +47,7 @@ const server = Bun.serve({
hostname: lanHost ? '0.0.0.0' : '127.0.0.1',
async fetch(req, srv) {
try {
if (needRebuild) await debouncedBuildDev()
if (needRebuild) await debouncedBuild()
console.debug(
chalk.gray(
`\u{1F79B} Receiving request from ${srv.requestIP(req)!.address}`,