chore(frontend): upgrade vite to v8

Bumps vite 7.3.3 → 8.0.13 and vite-tsconfig-paths 5.1.4 → 6.1.1.

Vite 8 ships rolldown (the Rust bundler that replaced rollup) and that
required two fixes:

1. build.rollupOptions.output.manualChunks: rolldown no longer accepts
   the { chunkName: [packages] } static object form, so it is now an
   (id) => string callback that matches paths under node_modules.

2. src/components/ui/resizable.tsx: switched from the namespace import
   `import * as ResizablePrimitive` to named `{ Group, Panel, Separator }`
   from react-resizable-panels. The v4 release of that library renamed
   PanelGroup → Group and PanelResizeHandle → Separator; rollup's
   loose tree-shaking happened to keep the old names working at
   build-time, but rolldown enforces the export list and the page
   failed at runtime with "Element type is invalid". Public wrapper
   exports (ResizableHandle, ResizablePanel, ResizablePanelGroup) are
   unchanged so the rest of the app keeps working.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sergey Kozyrenko
2026-05-19 09:39:20 +07:00
co-authored by Claude Opus 4.7
parent 8a3d4e951d
commit 1fa879839e
4 changed files with 277 additions and 590 deletions
+2 -2
View File
@@ -132,9 +132,9 @@
"tailwindcss": "^4.1.18",
"tsx": "^4.19.3",
"typescript": "^5.6.2",
"vite": "^7.3.2",
"vite": "^8.0.13",
"vite-plugin-html": "^3.2.2",
"vite-tsconfig-paths": "^5.0.1",
"vite-tsconfig-paths": "^6.1.1",
"vitest": "^4.0.0"
},
"packageManager": "pnpm@10.32.1",
+249 -552
View File
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -1,25 +1,25 @@
import { DragHandleDots2Icon } from '@radix-ui/react-icons';
import * as ResizablePrimitive from 'react-resizable-panels';
import { Group, Panel, Separator } from 'react-resizable-panels';
import { cn } from '@/lib/utils';
const ResizablePanelGroup = ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (
<ResizablePrimitive.PanelGroup
const ResizablePanelGroup = ({ className, ...props }: React.ComponentProps<typeof Group>) => (
<Group
className={cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className)}
{...props}
/>
);
const ResizablePanel = ResizablePrimitive.Panel;
const ResizablePanel = Panel;
const ResizableHandle = ({
className,
withHandle,
...props
}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
}: React.ComponentProps<typeof Separator> & {
withHandle?: boolean;
}) => (
<ResizablePrimitive.PanelResizeHandle
<Separator
className={cn(
'bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90',
className,
@@ -31,7 +31,7 @@ const ResizableHandle = ({
<DragHandleDots2Icon className="h-2.5 w-2.5" />
</div>
)}
</ResizablePrimitive.PanelResizeHandle>
</Separator>
);
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
+19 -29
View File
@@ -61,35 +61,25 @@ export default defineConfig(({ mode }) => {
minify: 'terser',
rollupOptions: {
output: {
manualChunks: {
'apollo-client': ['@apollo/client', 'graphql', 'graphql-ws'],
markdown: ['react-markdown', 'rehype-highlight', 'rehype-raw', 'rehype-slug', 'remark-gfm'],
'radix-ui': [
'@radix-ui/react-accordion',
'@radix-ui/react-avatar',
'@radix-ui/react-collapsible',
'@radix-ui/react-dialog',
'@radix-ui/react-dropdown-menu',
'@radix-ui/react-label',
'@radix-ui/react-popover',
'@radix-ui/react-scroll-area',
'@radix-ui/react-select',
'@radix-ui/react-separator',
'@radix-ui/react-slot',
'@radix-ui/react-switch',
'@radix-ui/react-tabs',
'@radix-ui/react-tooltip',
'@radix-ui/react-progress',
],
'react-vendor': ['react', 'react-dom', 'react-router-dom'],
terminal: [
'@xterm/addon-fit',
'@xterm/addon-search',
'@xterm/addon-unicode11',
'@xterm/addon-web-links',
'@xterm/addon-webgl',
'@xterm/xterm',
],
manualChunks: (id: string) => {
if (!id.includes('node_modules')) {
return;
}
if (/[\\/]@apollo[\\/]client|[\\/]graphql[\\/]|[\\/]graphql-ws[\\/]/.test(id)) {
return 'apollo-client';
}
if (/[\\/](react-markdown|rehype-highlight|rehype-raw|rehype-slug|remark-gfm)[\\/]/.test(id)) {
return 'markdown';
}
if (/[\\/]@radix-ui[\\/]/.test(id)) {
return 'radix-ui';
}
if (/[\\/]@xterm[\\/]/.test(id)) {
return 'terminal';
}
if (/[\\/](react|react-dom|react-router-dom)[\\/]/.test(id)) {
return 'react-vendor';
}
},
},
},