Skip to content

Commit bc1eff2

Browse files
feat: suggest entriesAware in bundle analyzer optimization tips
(#8502) Suggest `entriesAware` when common chunks contain modules only reachable from specific entries.
1 parent 7c89e51 commit bc1eff2

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

crates/rolldown_plugin_bundle_analyzer/src/render_markdown.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,13 @@ fn render_optimization_suggestions(out: &mut String, data: &AnalyzeData) {
348348
}
349349
out.push('\n');
350350
}
351+
352+
out.push_str("### Tip: Enable `entriesAware` for smarter code splitting\n\n");
353+
out.push_str(
354+
"Consider enabling `entriesAware: true` in your `codeSplitting.groups` configuration \
355+
to let rolldown automatically split chunks based on entry point reachability. \
356+
See https://rolldown.rs/reference/TypeAlias.CodeSplittingGroup#entriesaware\n\n",
357+
);
351358
}
352359

353360
fn render_full_module_graph(

examples/bundle-analyzer-demo/rolldown.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@ export default defineConfig({
1818
}
1919
},
2020
},
21-
plugins: [bundleAnalyzerPlugin()],
21+
plugins: [
22+
bundleAnalyzerPlugin({
23+
format: 'md',
24+
}),
25+
],
2226
});

examples/bundle-analyzer-demo/src/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { logger } from './utils/logger.js';
33
import { formatDate } from './utils/date-format.js';
44
import { validate } from './utils/validator.js';
55
import { getLocale } from './utils/locale.js';
6-
import './styles.css';
76

87
const loadAdmin = () => import('./features/admin.js');
98
const loadDashboard = () => import('./features/dashboard.js');

examples/bundle-analyzer-demo/src/styles.css

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)