diff --git a/frontend/src/views/TreeView.tsx b/frontend/src/views/TreeView.tsx index c0778282..8147ac29 100644 --- a/frontend/src/views/TreeView.tsx +++ b/frontend/src/views/TreeView.tsx @@ -183,7 +183,9 @@ function TreeCanvas({ source, tree, src, toast }: { // Autosave the view document. const firstSave = useRef(true) - const saveTimer = useRef() + // React 19's types dropped the zero-argument useRef overload, so the timer + // id starts as an explicit undefined instead. + const saveTimer = useRef(undefined) const saveNow = useCallback(() => { const doc: TreeViewDoc = { version: 1, @@ -228,7 +230,7 @@ function TreeCanvas({ source, tree, src, toast }: { el.addEventListener('wheel', onWheel, { passive: false }) return () => el.removeEventListener('wheel', onWheel) }, []) - const scrollTimer = useRef() + const scrollTimer = useRef(undefined) const onScroll = () => { const el = scrollRef.current if (!el) return diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index e25db006..5aea76c5 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -9,9 +9,9 @@ export default defineConfig({ sourcemap: false, rollupOptions: { output: { - manualChunks: { - plotly: ['plotly.js-dist-min'], - }, + // vite 8 (rolldown) took only the function form; the old object form + // died at "manualChunks is not a function". + manualChunks: (id: string) => (id.includes('plotly.js-dist-min') ? 'plotly' : undefined), }, }, },