vite-bundle-explorer 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,33 +1,38 @@
1
1
  # vite-bundle-explorer
2
2
 
3
- ![preview](https://raw.githubusercontent.com/Solant/vite-bundle-explorer/refs/heads/main/example.gif)
3
+ Bundle analyzer and visualizer tool for vite.
4
4
 
5
- A utility to help debug and optimize bundle sizes. It gathers Vite bundle statistics,
6
- including module sizes and import graphs, and visualizes them for an efficient debugging experience.
5
+ Current features:
6
+ - Chunk size treemap
7
+ - Module import graph
8
+ - Build stats report
9
+ - Detect duplicated dependencies
7
10
 
8
- We're always open to suggestions for improving the visualization, so feel free to share your ideas via GitHub issues!
11
+ ![preview](https://raw.githubusercontent.com/Solant/vite-bundle-explorer/refs/heads/main/preview.gif)
9
12
 
10
13
  ## How it works
11
14
 
12
- `vite-bundle-explorer` comprises two main components:
15
+ `vite-bundle-explorer` consists of two main parts:
13
16
 
14
- - Vite Plugin: Gathers detailed build statistics.
15
- - CLI Utility: Serves a user-friendly web interface for visualizing the data.
17
+ - Vite Plugin: Gathers detailed build statistics in JSON format
18
+ - CLI Utility: Serves a web interface for visualizing the data.
16
19
 
17
20
  ## Usage
18
21
 
19
- Install the package as a development dependency using your preferred package manager:
22
+ Install the package as a development dependency
20
23
 
21
24
  ```shell
22
25
  npm install -D vite-bundle-explorer
26
+ # yarn add -D vite-bundle-explorer
27
+ # pnpm add -D vite-bundle-explorer
23
28
  ```
24
29
 
25
30
  Next, add the `statsPlugin` to your vite config. This plugin will generate a `stats.json` file in your output directory
26
- after a successful build, containing all the necessary bundle statistics.
31
+ on successful build, containing all bundle stats.
27
32
 
28
33
  ```javascript
29
34
  import { defineConfig } from 'vite';
30
- import { statsPlugin } from 'vite-bundle-analyzer/plugin';
35
+ import { statsPlugin } from 'vite-bundle-explorer/plugin';
31
36
 
32
37
  export default defineConfig({
33
38
  plugins: [
@@ -40,15 +45,5 @@ export default defineConfig({
40
45
  Once your build is complete and `stats.json` is generated, you can launch the web interface using the CLI utility:
41
46
 
42
47
  ```shell
43
- npx vite-bundle-analyzer ./dist/stats.json
48
+ npx vite-bundle-explorer ./dist/stats.json
44
49
  ```
45
-
46
- This command will open a local server in your browser, providing a comprehensive visualization of your bundle.
47
-
48
- ## Frequently Asked Questions
49
-
50
- ### Q: Why do bundle and module sizes appear larger than their actual production values?
51
-
52
- A: The module sizes reported by the plugin represent their state _before_ minification and gzip compression.
53
-
54
- ---