mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Implement M1 authoring loop: library, editor, live preview, persistence
M1 MVP from docs/IMPLEMENTATION-PLAN.md, with the /alignment pass applied. - core: Snippet model + factory; prepareSpecForRender (copy-not-mutate); per-theme Vega chart config - state/orchestration: SnippetStore with debounced auto-save; IndexedDB adapter + read-time migration; startup hydration + write-through persistence - ui: SnippetLibrary, SpecEditor (Monaco edcore.main — full editor features, JSON-only languages), LivePreview - build: Monaco/Vega manual chunks; raised PWA precache ceiling - alignment: flush a valid draft on snippet switch (+regression tests); TODO breadcrumbs for the preview render race and the window.confirm delete - housekeeping: gitignore .claude/projects/
This commit is contained in:
@@ -16,6 +16,19 @@ export default defineConfig({
|
||||
define: {
|
||||
__APP_VERSION__: JSON.stringify(pkg.version),
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
// Split the heavy vendors so the chunk graph stays legible and the PWA
|
||||
// can precache/update them independently of app code. Monaco and the
|
||||
// Vega stack are each multi-MB; isolating them keeps app rebuilds small.
|
||||
manualChunks: {
|
||||
monaco: ['monaco-editor'],
|
||||
vega: ['vega', 'vega-lite', 'vega-embed'],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
react(),
|
||||
VitePWA({
|
||||
@@ -30,6 +43,11 @@ export default defineConfig({
|
||||
display: 'standalone',
|
||||
icons: [],
|
||||
},
|
||||
workbox: {
|
||||
// Monaco and Vega vendor chunks exceed Workbox's 2 MiB default; raise the
|
||||
// ceiling so the whole app (offline is a core requirement) is precached.
|
||||
maximumFileSizeToCacheInBytes: 6 * 1024 * 1024,
|
||||
},
|
||||
}),
|
||||
],
|
||||
// Vitest config (shares this file)
|
||||
|
||||
Reference in New Issue
Block a user