-
Notifications
You must be signed in to change notification settings - Fork 711
fix: render charts on homepage #8852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
removed echarts modules from Vite's optimizeDeps.exclude configuration to fix chart rendering issues on the homepage
Key changes:
- Removed exclusion of
echarts/core,echarts/renderers,echarts/components,echarts/features, andecharts/chartsfrom Vite's dependency optimization - Allows Vite to properly pre-bundle echarts dependencies, which was preventing
CustomChartRenderercomponents from working correctly on the homepage - The exclusion was causing runtime import issues that prevented charts from displaying
Context:
The homepage (HomeView.vue) uses CustomChartRenderer components that depend on echarts modules. By excluding these from Vite's optimization, the modules weren't being properly bundled, causing rendering failures. This change aligns with the existing manualChunks configuration (lines 169-175) which already bundles echarts modules together.
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- The change removes an unnecessary exclusion that was breaking chart functionality. The echarts modules are already configured in manualChunks for proper bundling, making the exclude unnecessary and problematic. No logical issues or syntax errors introduced.
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| web/vite.config.ts | 5/5 | removed echarts modules from vite optimizeDeps exclude list to allow proper dependency pre-bundling, fixing chart rendering on homepage |
Sequence Diagram
sequenceDiagram
participant Browser
participant Vite
participant EchartsDeps as Echarts Dependencies
participant HomePage
participant ChartRenderer
Note over Vite,EchartsDeps: Build Time Configuration
Browser->>Vite: Request app bundle
alt Before Fix (with exclude)
Vite->>EchartsDeps: Skip pre-bundling (excluded)
Note over EchartsDeps: echarts/core, echarts/charts, etc.<br/>not optimized by Vite
Vite->>Browser: Return bundle
Browser->>HomePage: Load home page
HomePage->>ChartRenderer: Render CustomChartRenderer
ChartRenderer->>EchartsDeps: Import echarts modules
Note over ChartRenderer,EchartsDeps: Runtime import issues<br/>Charts fail to render
end
alt After Fix (without exclude)
Vite->>EchartsDeps: Pre-bundle echarts modules
Note over EchartsDeps: Optimized dependency bundling
Vite->>Browser: Return optimized bundle
Browser->>HomePage: Load home page
HomePage->>ChartRenderer: Render CustomChartRenderer
ChartRenderer->>EchartsDeps: Import pre-bundled echarts
Note over ChartRenderer,EchartsDeps: Charts render successfully
end
1 file reviewed, no comments
|
| Status | Total | Passed | Failed | Skipped | Flaky | Pass Rate | Duration |
|---|---|---|---|---|---|---|---|
| All tests passed | 364 | 342 | 0 | 19 | 3 | 94% | 4m 39s |
User description
adding this to home page will stop rendering the charts
PR Type
Bug fix
Description
Remove ECharts from optimizeDeps exclude
Allow pre-bundling of ECharts modules
Fix homepage charts not rendering
Diagram Walkthrough
File Walkthrough
vite.config.ts
Allow ECharts to be optimized by Viteweb/vite.config.ts
optimizeDeps.excludeentries for ECharts subpackages.esbuildOptionsandforceconfiguration unchanged.