Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ bun run test # Run tests

**This repo uses bun**, not pnpm. Do NOT run `pnpm install` — it creates a `pnpm-lock.yaml` that should not exist. Workspace linking relies on bun's resolution from `"workspaces"` in root `package.json`.

### Studio Build

Always use the dev build locally — source maps, no minification, React dev-mode warnings:

```bash
bun run --cwd packages/studio build:dev
```

The production build (`build` without `:dev`) is only run by GitHub Actions for publish. After building, copy to CLI:

```bash
rm -rf packages/cli/dist/studio && cp -r packages/studio/dist packages/cli/dist/studio
```

### Linting & Formatting

This project uses **oxlint** and **oxfmt** (not biome, not eslint, not prettier).
Expand Down
1 change: 1 addition & 0 deletions packages/studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"build:dev": "vite build --mode development",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest"
Expand Down
34 changes: 21 additions & 13 deletions packages/studio/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -615,18 +615,26 @@ function devProjectApi(): Plugin {
};
}

export default defineConfig({
plugins: [react(), devProjectApi()],
resolve: {
alias: {
"@hyperframes/player": resolve(__dirname, "../player/src/hyperframes-player.ts"),
export default defineConfig(({ mode }) => {
const isDev = mode === "development";
return {
plugins: [react(), devProjectApi()],
resolve: {
alias: {
"@hyperframes/player": resolve(__dirname, "../player/src/hyperframes-player.ts"),
},
},
...(isDev && {
define: { "process.env.NODE_ENV": JSON.stringify("development") },
}),
build: {
outDir: "dist",
emptyOutDir: true,
sourcemap: isDev,
minify: !isDev,
},
},
build: {
outDir: "dist",
emptyOutDir: true,
},
server: {
port: 5190,
},
server: {
port: 5190,
},
};
});
Loading