Problem
src/components/ui/LocalHistoryDialog.tsx is imported two ways:
- Statically from
src/components/explorer/FilesExplorer.tsx:4
- Dynamically (via
lazy()) from src/components/layout/MainContent.tsx:36
Rollup's static import wins, so the lazy() in MainContent has zero effect — the dialog ends up in FilesExplorer's eager chunk and is loaded as part of the cold-start path anyway. Vite warns about this on every npm run build:
LocalHistoryDialog.tsx is dynamically imported by … MainContent.tsx but also statically imported by … FilesExplorer.tsx, dynamic import will not move module into another chunk.
Fix
Convert FilesExplorer.tsx's static import to a lazy() + Suspense wrapper that matches the pattern in MainContent.tsx. Once both sites are lazy, Rollup splits the dialog into its own chunk and the warning disappears.
Acceptance
npm run build no longer emits the "dynamic import will not move module into another chunk" warning for LocalHistoryDialog.tsx.
- The dialog still opens correctly from both Files Explorer and the editor's local-history button.
Problem
src/components/ui/LocalHistoryDialog.tsxis imported two ways:src/components/explorer/FilesExplorer.tsx:4lazy()) fromsrc/components/layout/MainContent.tsx:36Rollup's static import wins, so the
lazy()inMainContenthas zero effect — the dialog ends up inFilesExplorer's eager chunk and is loaded as part of the cold-start path anyway. Vite warns about this on everynpm run build:Fix
Convert
FilesExplorer.tsx's static import to alazy()+Suspensewrapper that matches the pattern inMainContent.tsx. Once both sites are lazy, Rollup splits the dialog into its own chunk and the warning disappears.Acceptance
npm run buildno longer emits the "dynamic import will not move module into another chunk" warning forLocalHistoryDialog.tsx.