build: migrate from tsup to rslib #70
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
tsup's built-in
nodeProtocolPluginstrips thenode:prefix from all Node.js builtins during bundling. For most modules (node:fs,node:path, etc.) this is harmless since the unprefixed form also works. However,node:sqlite(added in Node 22.5) has no unprefixed form, causingERR_MODULE_NOT_FOUNDat runtime.This affects both
@uncaged/nerve-daemonand@uncaged/nerve-clipackages.A workaround exists (post-build
onSuccesshook to sed the output), but it's fragile and shouldn't be needed.Proposed Solution
Migrate from tsup (esbuild-based) to rslib (rspack-based):
node:prefix strippingScope
packages/daemonpackages/clipackages/corelog-store.tsparams type (Record<string, unknown>→Record<string, string | number>)nerve initworks correctly小橘 🍊(NEKO Team)