File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -140,3 +140,4 @@ src/webpage/translations/langs.js
140
140
141
141
package-lock.json
142
142
pnpm-lock.yaml
143
+ build.js
Original file line number Diff line number Diff line change
1
+ import * as swc from "@swc/core" ;
2
+ import path from "node:path" ;
3
+ import { fileURLToPath } from "node:url" ;
4
+ import { promises as fs } from "fs" ;
5
+ import child_process from "child_process" ;
6
+
7
+ const __filename = fileURLToPath ( import . meta. url ) ;
8
+ const __dirname = path . dirname ( __filename ) ;
9
+
10
+ const mod = await swc . transformFile ( path . join ( __dirname , "build.ts" ) , {
11
+ minify : true ,
12
+ sourceMaps : true ,
13
+ isModule : true ,
14
+ } ) ;
15
+
16
+ await fs . writeFile ( path . join ( __dirname , "build.js" ) , mod . code ) ;
Original file line number Diff line number Diff line change 6
6
"type" : " module" ,
7
7
"scripts" : {
8
8
"bunBuild" : " bun build.ts" ,
9
- "build" : " node --experimental-strip-types build.ts " ,
9
+ "build" : " node buildnode.js && node build.js " ,
10
10
"start" : " node dist/index.js"
11
11
},
12
12
"author" : " MathMan05" ,
You can’t perform that action at this time.
0 commit comments