@tscircuit/runframe 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bun.lockb CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tscircuit/runframe",
3
3
  "main": "dist/index.js",
4
4
  "type": "module",
5
- "version": "0.0.6",
5
+ "version": "0.0.7",
6
6
  "scripts": {
7
7
  "start": "cosmos",
8
8
  "build": "bun run build:css && bun run build:standalone && bun run build:lib",
@@ -10,6 +10,7 @@
10
10
  "build:css": "bun run scripts/build-css.ts",
11
11
  "build:site": "cosmos-export",
12
12
  "build:standalone": "STANDALONE=1 vite build",
13
+ "analyze": "source-map-explorer 'dist/standalone.min.js'",
13
14
  "format:check": "biome format .",
14
15
  "format": "biome format --write .",
15
16
  "vercel-build": "bun run build:css && cosmos-export"
@@ -25,6 +26,8 @@
25
26
  "react": "18",
26
27
  "react-cosmos": "^6.2.1",
27
28
  "react-dom": "18",
29
+ "rollup-plugin-visualizer": "^5.12.0",
30
+ "source-map-explorer": "^2.5.3",
28
31
  "tailwindcss": "^3.4.16",
29
32
  "tsup": "^8.3.5",
30
33
  "vite": "^6.0.3"
package/vite.config.ts CHANGED
@@ -3,6 +3,7 @@ import react from "@vitejs/plugin-react"
3
3
  import { resolve } from "node:path"
4
4
  import winterspecBundle from "@tscircuit/file-server/dist/bundle"
5
5
  import { getNodeHandler } from "winterspec/adapters/node"
6
+ import { visualizer } from "rollup-plugin-visualizer"
6
7
 
7
8
  const fakeHandler = getNodeHandler(winterspecBundle as any, {})
8
9
 
@@ -24,13 +25,21 @@ function apiServerPlugin(): Plugin {
24
25
 
25
26
  const plugins: any[] = [react()]
26
27
 
27
- if (!process.env.VERCEL) {
28
+ if (!process.env.VERCEL && !process.env.STANDALONE) {
28
29
  plugins.push(apiServerPlugin())
29
30
  }
30
31
 
31
32
  let build: any = undefined
32
33
 
33
34
  if (process.env.STANDALONE) {
35
+ // plugins.push(
36
+ // visualizer({
37
+ // filename: "stats.html",
38
+ // open: true, // Will open the stats.html file after build
39
+ // gzipSize: true,
40
+ // brotliSize: true,
41
+ // }),
42
+ // )
34
43
  build = {
35
44
  lib: {
36
45
  entry: resolve(__dirname, "src/main.tsx"),
@@ -39,6 +48,7 @@ if (process.env.STANDALONE) {
39
48
  formats: ["umd"],
40
49
  },
41
50
  minify: true,
51
+ // reportCompressedSize: true,
42
52
  }
43
53
  }
44
54