You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/document/docs/en/guide/more/faq.mdx
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,3 +138,49 @@ When using Rsdoctor to analyze the compilation time of Rspack projects, you may
138
138
- Reason: The loader in [CssExtractRspackPlugin](https://rspack.rs/plugins/rspack/css-extract-rspack-plugin) asynchronously calls other loaders during the pitch phase and waits for the callback results after these loaders execute. Therefore, the time taken by CssExtractRspackPlugin actually includes the execution time of other loaders and idle time.
## Using Rsdoctor with Re.Pack or Custom Bundle Extensions
143
+
144
+
Rsdoctor now supports custom JavaScript bundle file extensions beyond the standard `.js` extension. This is particularly useful for projects like Re.Pack that use `.bundle` extensions.
145
+
146
+
### Supported Extensions
147
+
148
+
By default, Rsdoctor recognizes the following JavaScript bundle extensions:
149
+
150
+
-`.js` - Standard JavaScript files
151
+
-`.bundle` - Re.Pack and other custom bundlers
152
+
153
+
### No Configuration Required
154
+
155
+
If your project generates bundle files with a `.bundle` extension (e.g., `main.bundle`, `vendor.bundle`), Rsdoctor will automatically:
156
+
157
+
- Parse and analyze `.bundle` files alongside `.js` files
158
+
- Display `.bundle` files in the Bundle Analyzer Graph
159
+
- Include `.bundle` assets in JavaScript asset statistics
160
+
- Support source map analysis for `.bundle` files
161
+
162
+
### How It Works
163
+
164
+
The detection logic has been updated in the following areas:
165
+
166
+
1.**Bundle Parsing**: The `parseBundle` function now accepts both `.js` and `.bundle` extensions when analyzing bundle contents.
167
+
2.**Asset Filtering**: Asset summary and filtering functions treat `.bundle` files as JavaScript assets.
168
+
3.**File Type Detection**: All file extension matching utilities include `.bundle` as a recognized JavaScript extension.
169
+
170
+
### Example Use Case
171
+
172
+
Re.Pack projects typically generate bundles with the `.bundle` extension:
173
+
174
+
```
175
+
dist/
176
+
├── index.bundle ← Now supported!
177
+
├── vendor.bundle ← Now supported!
178
+
├── styles.css
179
+
└── assets/
180
+
```
181
+
182
+
Rsdoctor will automatically detect and analyze these `.bundle` files without any additional configuration.
183
+
184
+
### Future Extensions
185
+
186
+
If you need support for additional custom extensions, please open an issue on the [Rsdoctor GitHub repository](https://github.com/web-infra-dev/rsdoctor) with details about your use case.
0 commit comments