diff --git a/frontend/src/views/TreeView.tsx b/frontend/src/views/TreeView.tsx index c0778282..b95f7028 100644 --- a/frontend/src/views/TreeView.tsx +++ b/frontend/src/views/TreeView.tsx @@ -183,7 +183,7 @@ function TreeCanvas({ source, tree, src, toast }: { // Autosave the view document. const firstSave = useRef(true) - const saveTimer = useRef() + const saveTimer = useRef(undefined) const saveNow = useCallback(() => { const doc: TreeViewDoc = { version: 1, @@ -228,7 +228,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..8b94649d 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -9,9 +9,10 @@ export default defineConfig({ sourcemap: false, rollupOptions: { output: { - manualChunks: { - plotly: ['plotly.js-dist-min'], - }, + // Vite 8 (rolldown) accepts manualChunks only as a function; the + // object form it replaces listed plotly.js-dist-min by package name. + manualChunks: (id: string) => + id.includes('plotly.js-dist-min') ? 'plotly' : undefined, }, }, },