build with rolldown instead for faster builds

DreamingCodes committed Mar 22, 2025 at 20:18 UTC ca12087218c6ccca7e3f264561b90cd4d82fbe8f
3 files changed +7 -5
bun.lockb
Binary files a/bun.lockb and b/bun.lockb differ
package.json
+3 -2
@@ -14,11 +14,12 @@
14 },
15 "files": ["dist-js", "README.md"],
16 "scripts": {
17 - "build": "rollup -c",
17 + "build": "rolldown -c",
18 "prepublishOnly": "bun run check && bun run build",
19 "pretest": "bun run check",
20 "tauri": "tauri",
21 "biome": "biome",
22 + "rolldown": "rolldown",
23 "format": "biome format",
24 "lint": "biome lint",
25 "check": "biome check"
@@ -30,7 +31,7 @@
31 "@biomejs/biome": "1.9.4",
32 "@rollup/plugin-typescript": "^11.1.6",
33 "@tauri-apps/cli": "next",
33 - "rollup": "^4.18.1",
34 + "rolldown": "^1.0.0-beta.6",
35 "tslib": "^2.6.3",
36 "typescript": "^5.5.3"
37 }
rolldown.config.js renamed
+4 -3
@@ -1,11 +1,12 @@
1 -import { readFileSync } from "node:fs";
1 +import { defineConfig } from 'rolldown'
2 import { join } from "node:path";
3 import { cwd } from "node:process";
4 import typescript from "@rollup/plugin-typescript";
5 +import {readFileSync} from "fs"
6
7 const pkg = JSON.parse(readFileSync(join(cwd(), "package.json"), "utf8"));
8
8 -export default {
9 +export default defineConfig({
10 input: "guest-js/index.ts",
11 output: [
12 {
@@ -28,4 +29,4 @@ export default {
29 ...Object.keys(pkg.dependencies || {}),
30 ...Object.keys(pkg.peerDependencies || {}),
31 ],
31 -};
32 +});