mirror of https://github.com/buster-so/buster.git
vite builder optimization
This commit is contained in:
parent
0711d4e128
commit
c505374ce9
|
@ -13,9 +13,8 @@ This is an internal monorepo package. It's automatically available to other pack
|
|||
Components must be imported from their specific paths for optimal tree-shaking:
|
||||
|
||||
```typescript
|
||||
import { LineChart } from '@buster/ui-components/components/charts';
|
||||
import { DataTable } from '@buster/ui-components/components/table';
|
||||
```
|
||||
import { BusterChart } from '@buster/ui-components/components/charts';
|
||||
```
|
||||
|
||||
### Hooks
|
||||
|
||||
|
|
|
@ -28,11 +28,31 @@
|
|||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
"react-dom": "^18.0.0",
|
||||
"chart.js": "^4.5.0",
|
||||
"chartjs-adapter-dayjs-4": "^1.0.4",
|
||||
"chartjs-plugin-annotation": "^3.1.0",
|
||||
"chartjs-plugin-datalabels": "^2.2.0",
|
||||
"chartjs-plugin-deferred": "^2.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"react-dom": {
|
||||
"optional": true
|
||||
},
|
||||
"chart.js": {
|
||||
"optional": false
|
||||
},
|
||||
"chartjs-adapter-dayjs-4": {
|
||||
"optional": false
|
||||
},
|
||||
"chartjs-plugin-annotation": {
|
||||
"optional": false
|
||||
},
|
||||
"chartjs-plugin-datalabels": {
|
||||
"optional": false
|
||||
},
|
||||
"chartjs-plugin-deferred": {
|
||||
"optional": false
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -61,11 +81,6 @@
|
|||
"@tanstack/react-virtual": "^3.13.12",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@vitejs/plugin-react": "^4.7.0",
|
||||
"chart.js": "4.5.0",
|
||||
"chartjs-adapter-dayjs-4": "^1.0.4",
|
||||
"chartjs-plugin-annotation": "^3.1.0",
|
||||
"chartjs-plugin-datalabels": "^2.2.0",
|
||||
"chartjs-plugin-deferred": "^2.0.0",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"dayjs": "^1.11.13",
|
||||
|
|
|
@ -69,6 +69,12 @@ export default defineConfig({
|
|||
'react',
|
||||
'react-dom',
|
||||
'react/jsx-runtime',
|
||||
// Add Chart.js and its plugins as external dependencies
|
||||
'chart.js',
|
||||
'chartjs-adapter-dayjs-4',
|
||||
'chartjs-plugin-annotation',
|
||||
'chartjs-plugin-datalabels',
|
||||
'chartjs-plugin-deferred',
|
||||
// Exclude test dependencies
|
||||
/\.test\./,
|
||||
/\.stories\./,
|
||||
|
@ -91,6 +97,11 @@ export default defineConfig({
|
|||
react: 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
'react/jsx-runtime': 'ReactJSXRuntime',
|
||||
'chart.js': 'Chart',
|
||||
'chartjs-adapter-dayjs-4': 'ChartJSAdapterDayJS4',
|
||||
'chartjs-plugin-annotation': 'ChartJSAnnotationPlugin',
|
||||
'chartjs-plugin-datalabels': 'ChartDataLabels',
|
||||
'chartjs-plugin-deferred': 'ChartDeferred',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -998,7 +998,7 @@ importers:
|
|||
specifier: ^4.7.0
|
||||
version: 4.7.0(vite@7.0.5(@types/node@24.0.10)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.2)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))
|
||||
chart.js:
|
||||
specifier: 4.5.0
|
||||
specifier: ^4.5.0
|
||||
version: 4.5.0
|
||||
chartjs-adapter-dayjs-4:
|
||||
specifier: ^1.0.4
|
||||
|
|
Loading…
Reference in New Issue