build: order Host and Client compilation faces

This commit is contained in:
imccyu
2026-08-08 03:29:12 +08:00
parent 8158a0e63a
commit 9c3d5725a5
32 changed files with 440 additions and 184 deletions

View File

@@ -1,4 +1,4 @@
import { defineConfig } from 'tsdown'
import { clientOnly } from '../tsdown.client.ts'
/**
* Root-shape lib build plus a css stub: the shell's components import
@@ -8,7 +8,7 @@ import { defineConfig } from 'tsdown'
* this node lib build stubs every css import to an empty module — importing
* the lib under plain node must not crash on an asset specifier.
*/
export default defineConfig({
export default clientOnly([{
entry: ['lib/types/index.js', 'lib/types/invariant.js'],
outDir: 'lib',
format: ['esm'],
@@ -28,4 +28,4 @@ export default defineConfig({
return 'export default {};'
},
}],
})
}])