Skip to content

Commit dc9ae2e

Browse files
authored
Merge pull request #556 from techniq:bundle-visualizer
Setup rollup-plugin-visualizer to analyze bundle
2 parents 76d9de2 + 6e76bb3 commit dc9ae2e

3 files changed

Lines changed: 122 additions & 0 deletions

File tree

packages/layerchart/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"prism-themes": "^1.9.0",
6464
"prismjs": "^1.30.0",
6565
"rehype-slug": "^6.0.0",
66+
"rollup-plugin-visualizer": "^6.0.3",
6667
"shapefile": "^0.6.6",
6768
"solar-calculator": "^0.3.0",
6869
"svelte": "5.32.1",

packages/layerchart/vite.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import dsv from '@rollup/plugin-dsv';
55
import { autoType } from 'd3-dsv';
66
import Icons from 'unplugin-icons/vite';
77
import devtoolsJson from 'vite-plugin-devtools-json';
8+
import { visualizer } from 'rollup-plugin-visualizer';
89

910
/** @type {import('vite').UserConfig} */
1011
const config = {
@@ -19,6 +20,10 @@ const config = {
1920
}),
2021
// @ts-expect-error
2122
devtoolsJson(),
23+
visualizer({
24+
emitFile: true,
25+
filename: 'stats.html',
26+
}),
2227
],
2328
// optimizeDeps: {
2429
// include: ['svelte-ux'],

pnpm-lock.yaml

Lines changed: 116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)