Skip to content

[Feature Request]: Apply minSize threshold to dynamic import chunks #8707

@silverwind

Description

@silverwind

Reproduction link or steps

Clone repro repo and run build:

git clone https://github.com/silverwind/rolldown-min-size
cd rolldown-min-size
bash test.sh

What is expected?

Dynamic import chunks below codeSplitting.minSize should be inlined into the importing chunk:

dist/index.js  400 bytes

What is actually happening?

Three 82-byte chunks are created despite minSize: 5000:

dist/a-Du6YnaoI.js  82 bytes
dist/b-a_hYdL6E.js  82 bytes
dist/c-DKgi_ZJh.js  82 bytes
dist/index.js       267 bytes

Rolldown warns: "Manual code splitting options (minSize) specified without groups. These options have no effect without groups.". It seems this is a feature gap that it does not work without groups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions