#11040·rolldown

Feedback on `codeSplitting.experimentalInlineCommonChunks`

Author: hyfdevCreated Sep 30, 2026Updated Oct 1, 2026

A detailed practical guide is in the works. Subscribe to this issue to stay tuned.


This issue collects feedback on codeSplitting.experimentalInlineCommonChunks. I'll also share plans and progress updates here. Subscribe if you'd like to follow its development.

The feature will be available via ouput.codeSplitting.experimentalInlineCommonChunks after today's release. It aims to reduce requests by inlining eligible small common chunks into the chunks that use them, while preserving correct execution semantic. See the RFC for the motivation and design.

Quick start

For an application with ESM output, enable it in your Rolldown configuration:

javascript
// rolldown.config.mjs
import { defineConfig } from 'rolldown';

export default defineConfig({
  input: 'src/main.js',
  output: {
    dir: 'dist',
    format: 'es',
    preserveEntrySignatures: false,
    codeSplitting: {
      experimentalInlineCommonChunks: {
        // Inline eligible common chunks whose transformed source size is smaller than 10 KiB.
        maxSize: 10 * 1024,
      },
    },
  },
});
  • maxSize is measured in bytes of transformed source, summed across a common chunk.
  • The 10 KiB value above is an example starting point; tune it based on your application's loading results.

Feedback

Feedback is welcome, including:

  • Use cases where the current chunking causes problems and what you'd like to improve.
  • Results from trying the feature in real applications, including request counts and transferred bytes for representative pages or routes.
  • Bugs or compatibility issues with frameworks and plugins.

If you've tried the feature, please include your Rolldown version, relevant configuration, and a before/after comparison where possible. A minimal reproduction is especially helpful for bugs. Inlining trades fewer separate chunks for potentially duplicated code, so both loading improvements and regressions are useful feedback.

TODOs

  • Make inlineCommonChunks work with react router application