mirror of
https://github.com/Dvorinka/excalidraw-full.git
synced 2026-07-30 16:13:48 +00:00
refactor(editor): improve type safety and optimize build chunks
Docker Images / Build and push (push) Failing after 21s
Docker Images / Build and push (push) Failing after 21s
Refactor the Editor component to replace `any` types with explicit interfaces for Excalidraw props, library items, and elements, improving type safety and developer experience. Additionally, update the Vite configuration to implement manual chunking for large dependencies like Excalidraw, React, and Zustand to optimize bundle loading and improve build performance.
This commit is contained in:
@@ -27,5 +27,17 @@ export default defineConfig({
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
sourcemap: true,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
'excalidraw': ['@excalidraw/excalidraw'],
|
||||
'react-vendor': ['react', 'react-dom', 'react-router-dom'],
|
||||
'ui-vendor': ['lucide-react', 'clsx'],
|
||||
'i18n': ['i18next', 'react-i18next', 'i18next-browser-languagedetector'],
|
||||
'state': ['zustand'],
|
||||
},
|
||||
},
|
||||
},
|
||||
chunkSizeWarningLimit: 1000,
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user