Skip to content

Commit 2f7fb86

Browse files
committed
chore: adjust build
1 parent c62a2af commit 2f7fb86

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

build.ts

+27-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
1+
import process from 'node:process'
12
import { dts } from 'bun-plugin-dtsx'
23

3-
await Bun.build({
4-
entrypoints: ['src/index.ts'],
4+
console.log('Building...')
5+
6+
// await $`rm -rf ./dist`
7+
8+
const result = await Bun.build({
9+
entrypoints: ['./src/index.ts'],
510
outdir: './dist',
6-
plugins: [dts()],
11+
format: 'esm',
12+
target: 'node',
13+
minify: true,
14+
// splitting: true,
15+
plugins: [
16+
dts(),
17+
],
718
})
19+
20+
if (!result.success) {
21+
console.error('Build failed')
22+
23+
for (const message of result.logs) {
24+
// Bun will pretty print the message object
25+
console.error(message)
26+
}
27+
28+
process.exit(1)
29+
}
30+
31+
console.log('Build complete')

bun.lockb

0 Bytes
Binary file not shown.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
"devDependencies": {
4444
"@stacksjs/eslint-config": "^3.8.1-beta.2",
45-
"@stacksjs/rpx": "^0.6.2",
45+
"@stacksjs/rpx": "^0.6.5",
4646
"@types/bun": "^1.1.14",
4747
"bumpp": "^9.9.0",
4848
"bun-plugin-dtsx": "^0.21.9",

0 commit comments

Comments
 (0)