File tree 3 files changed +28
-4
lines changed
3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change
1
+ import process from 'node:process'
1
2
import { dts } from 'bun-plugin-dtsx'
2
3
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' ] ,
5
10
outdir : './dist' ,
6
- plugins : [ dts ( ) ] ,
11
+ format : 'esm' ,
12
+ target : 'node' ,
13
+ minify : true ,
14
+ // splitting: true,
15
+ plugins : [
16
+ dts ( ) ,
17
+ ] ,
7
18
} )
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' )
Original file line number Diff line number Diff line change 42
42
},
43
43
"devDependencies" : {
44
44
"@stacksjs/eslint-config" : " ^3.8.1-beta.2" ,
45
- "@stacksjs/rpx" : " ^0.6.2 " ,
45
+ "@stacksjs/rpx" : " ^0.6.5 " ,
46
46
"@types/bun" : " ^1.1.14" ,
47
47
"bumpp" : " ^9.9.0" ,
48
48
"bun-plugin-dtsx" : " ^0.21.9" ,
You can’t perform that action at this time.
0 commit comments