Something went wrong. Try again.
Browser extension: detect and subscribe to standard.site publications on ATProto substandard.blog
Something went wrong. Try again.
12345678910111213141516171819202122// Watch mode for both build environments (see vite.config.ts) so dist/ stays// loadable while editing: clear dist/ once, then start a rollup watcher per// environment. emptyOutDir is turned off because watch mode would otherwise// re-empty dist/ on every rebuild, deleting the other environment's output.//// Usage: npm run dev — then load dist/ unpacked and reload the extension// in chrome://extensions after edits.
import { rmSync } from 'node:fs'import { resolve } from 'node:path'import { createBuilder } from 'vite'
const root = resolve(import.meta.dirname, '..')rmSync(resolve(root, 'dist'), { recursive: true, force: true })console.log('[dev] cleared dist/, starting watchers')
const builder = await createBuilder({ root, build: { watch: {}, emptyOutDir: false },})await builder.buildApp() // starts a persistent rollup watcher per environment