Skip to content

Comments

feat: add codeSplitting: boolean and deprecate inlineDynamicImports#7870

Merged
hyf0 merged 2 commits intomainfrom
01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_
Jan 15, 2026
Merged

feat: add codeSplitting: boolean and deprecate inlineDynamicImports#7870
hyf0 merged 2 commits intomainfrom
01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_

Conversation

@hyf0
Copy link
Member

@hyf0 hyf0 commented Jan 14, 2026

No description provided.

@hyf0 hyf0 marked this pull request as ready for review January 14, 2026 05:55
Copilot AI review requested due to automatic review settings January 14, 2026 05:55
Copy link
Member Author

hyf0 commented Jan 14, 2026


How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@netlify
Copy link

netlify bot commented Jan 14, 2026

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit ffbfdba
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69688d9976fd4500088a4c77
😎 Deploy Preview https://deploy-preview-7870--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new string-based API for the codeSplitting option ('auto' | 'none'), deprecates the inlineDynamicImports option in favor of codeSplitting: 'none', and updates validation schemas and CLI help text accordingly.

Changes:

  • Extended codeSplitting option to accept 'auto' and 'none' string values in addition to the existing object configuration
  • Deprecated inlineDynamicImports option with console warnings directing users to use codeSplitting: 'none'
  • Updated validation schemas to accept the new union type for codeSplitting

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
packages/rolldown/tests/cli/snapshots/cli-e2e.test.ts.snap Updated CLI help text to reflect simplified codeSplitting option description
packages/rolldown/src/utils/validator.ts Extended validation schema to accept 'auto' and 'none' literal values for codeSplitting
packages/rolldown/src/utils/bindingify-output-options.ts Implemented new logic to handle codeSplitting string values and deprecation warnings for inlineDynamicImports
packages/rolldown/src/options/output-options.ts Updated type definitions and documentation for codeSplitting and marked inlineDynamicImports as deprecated

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hyf0 hyf0 force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from a051552 to ad9fec0 Compare January 14, 2026 12:19
@hyf0 hyf0 changed the title feat: add codeSplitting: 'auto' | 'none' and deprecate inlineDynamicImports feat: add codeSplitting: boolean and deprecate inlineDynamicImports Jan 14, 2026
@hyf0 hyf0 requested review from Copilot and sapphi-red January 14, 2026 12:23
@hyf0 hyf0 force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from ad9fec0 to 48021a7 Compare January 14, 2026 12:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@hyf0 hyf0 force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from 48021a7 to abf4654 Compare January 14, 2026 14:45
Copilot AI review requested due to automatic review settings January 14, 2026 16:38
@hyf0 hyf0 force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from abf4654 to 726d5b0 Compare January 14, 2026 16:38
@hyf0 hyf0 force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from 726d5b0 to fa37dc5 Compare January 14, 2026 16:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hyf0 hyf0 force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from fa37dc5 to e3433f3 Compare January 14, 2026 19:19
Copilot AI review requested due to automatic review settings January 15, 2026 03:51
@hyf0 hyf0 force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from e3433f3 to 9c26984 Compare January 15, 2026 03:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hyf0 hyf0 force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from 9c26984 to af28394 Compare January 15, 2026 04:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@graphite-app graphite-app bot force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from 5234802 to 554d323 Compare January 15, 2026 04:56
Copilot AI review requested due to automatic review settings January 15, 2026 05:22
@graphite-app graphite-app bot force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from 554d323 to 94ef8fe Compare January 15, 2026 05:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@graphite-app graphite-app bot force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from 94ef8fe to f97b831 Compare January 15, 2026 05:32
@hyf0 hyf0 force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from f97b831 to 554d323 Compare January 15, 2026 05:58
Copilot AI review requested due to automatic review settings January 15, 2026 05:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hyf0 hyf0 force-pushed the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch from 0931062 to ffbfdba Compare January 15, 2026 06:47
Copilot AI review requested due to automatic review settings January 15, 2026 06:47
@hyf0 hyf0 merged commit d0af4d3 into main Jan 15, 2026
9 of 10 checks passed
@hyf0 hyf0 deleted the 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_ branch January 15, 2026 06:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 45 out of 45 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

impl CodeSplittingMode {
/// Returns true if automatic code splitting is enabled
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The is_automatic method is defined but never used in the codebase. Consider removing it to reduce unused code, or if it's intended for future use, add a TODO comment explaining its purpose.

Suggested change
/// Returns true if automatic code splitting is enabled
/// Returns true if automatic code splitting is enabled.
///
/// TODO: This helper is currently unused within this crate but is part of the
/// public API and is kept for future use (and potential external callers),
/// especially if additional `CodeSplittingMode` variants are introduced.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

Benchmarks Rust

  • target: main(6a1946b)
  • pr: 01-13-feat_add_codesplitting_auto_none_and_deprecate_inlinedynamicimports_(ffbfdba)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     69.1±2.82ms        ? ?/sec    1.02     70.6±1.63ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     75.9±2.17ms        ? ?/sec    1.01     76.9±2.15ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    105.2±2.70ms        ? ?/sec    1.01    106.4±2.63ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    117.5±2.84ms        ? ?/sec    1.01    118.6±3.08ms        ? ?/sec
bundle/bundle@threejs                                        1.01     36.3±2.31ms        ? ?/sec    1.00     36.0±1.06ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     40.7±0.70ms        ? ?/sec    1.01     41.1±0.76ms        ? ?/sec
bundle/bundle@threejs10x                                     1.01    386.6±6.58ms        ? ?/sec    1.00    384.1±5.96ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    443.7±7.36ms        ? ?/sec    1.01    447.7±9.08ms        ? ?/sec
scan/scan@rome_ts                                            1.00     82.7±1.72ms        ? ?/sec    1.00     82.5±2.19ms        ? ?/sec
scan/scan@threejs                                            1.02     28.6±1.78ms        ? ?/sec    1.00     28.0±0.40ms        ? ?/sec
scan/scan@threejs10x                                         1.00    289.1±4.71ms        ? ?/sec    1.06    305.5±8.89ms        ? ?/sec

This was referenced Jan 21, 2026
shulaoda pushed a commit that referenced this pull request Jan 22, 2026
## [1.0.0-rc.1] - 2026-01-22

### 🚀 Features

- debug_info: add facade chunk elimination reason (#7980) by @IWANABETHATGUY
- support lazy barrel optimization (#7933) by @shulaoda
- add `experimental.lazyBarrel` option (#7908) by @shulaoda
- skip unused external modules from IIFE parameter list (#7978) by @sapphi-red
- add custom panic hook for better crash reporting (#7752) by @shulaoda
- treeshake: add `invalidImportSideEffects` option (#7958) by @shulaoda
- merge allow-extension emitted chunks (#7940) by @IWANABETHATGUY
- nativeMagicString generateMap (#7944) by @IWANABETHATGUY
- Include meta.magicString in RenderChunkMeta (#7943) by @IWANABETHATGUY
- debug_info: add debug info for eliminated facade chunks (#7946) by @IWANABETHATGUY
- stablize `strictExecutionOrder` and move to `output.strictExecutionOrder` from `experimental.strictExecutionOrder` (#7901) by @sapphi-red
- add documentation link to require() error message (#7898) by @Copilot
- add `codeSplitting: boolean` and deprecate `inlineDynamicImports` (#7870) by @hyf0
- dev: change lazy module URL to `/@vite/lazy` from `/lazy` (#7884) by @sapphi-red

### 🐛 Bug Fixes

- transform JS files containing `</script>` to escape template literals (#7987) by @IWANABETHATGUY
- apply avoid-breaking-exported-api = false to clippy.toml and fix clippy errors (#7982) by @Boshen
- pass `kind` from `this.resolve` (#7981) by @sapphi-red
- rolldown_plugin_vite_resolve: ignore yarn resolution errors and fallback to other resolvers (#7968) by @sapphi-red
- renamer: prevent renaming symbols when there no conflicts (#7936) by @Dunqing
- correct minifyInterExports when emitted chunk got merged (#7941) by @IWANABETHATGUY
- deduplicate entry points when module is both emitted and dynamically imported (#7885) by @IWANABETHATGUY
- dev: add `@vite-ignore` to lazy compilation proxy module import (#7883) by @sapphi-red

### 🚜 Refactor

- rust: enable clippy nursery lint group (#8002) by @Boshen
- rust: fix inconsistent_struct_constructor clippy lint (#7999) by @Boshen
- rust: fix needless_pass_by_ref_mut clippy lint (#7994) by @Boshen
- rust: fix unnecessary_wraps clippy lint (#7993) by @Boshen
- rust: fix enum_variant_names clippy lint (#7992) by @Boshen
- fix single_match clippy lint (#7997) by @Boshen
- rust: fix redundant_clone clippy lint (#7996) by @Boshen
- rust: rename CJS to Cjs to follow upper_case_acronyms lint (#7991) by @Boshen
- rust: remove unnecessary Box wrapper around Vec in MemberExprRef (#7990) by @Boshen
- import_record: make resolved_module optional (#7907) by @shulaoda
- remove unnecessary `.parse` (#7966) by @sapphi-red
- remove unused `ImportRecordMeta::IsPlainImport` (#7948) by @shulaoda
- proper set chunk meta (#7939) by @IWANABETHATGUY
- module_loader: remove `try_spawn_with_cache` (#7920) by @shulaoda
- link_stage: simplify `ImportStatus::NoMatch` to unit variant (#7909) by @shulaoda
- improve global scope symbol reservation in chunk deconfliction (#7906) by @IWANABETHATGUY
- simplify ast unwrapping in generate stage (#7900) by @IWANABETHATGUY
- generate_stage: optimize cross-chunk imports computation (#7889) by @shulaoda
- link_stage: move runtime require logic into match branch (#7892) by @shulaoda
- link_stage: simplify runtime require reference conditions (#7891) by @shulaoda
- link_stage: inline and simplify external dynamic import check (#7890) by @shulaoda
- generate_stage: simplify external module import collection logic (#7887) by @shulaoda
- avoid redundant module lookup in TLA computation (#7886) by @shulaoda
- dev: `devEngine.compileEntry` does not return null (#7882) by @sapphi-red
- dev: fix type errors for test HMR runtime (#7881) by @sapphi-red
- dev: move `clientId` property to `DevRuntime` base class (#7880) by @sapphi-red
- dev: generate client id in browser (#7878) by @hyf0

### 📚 Documentation

- apis: organize hook filters documentation and add composable filters section (#8003) by @sapphi-red
- update `vitepress-plugin-group-icons` (#7947) by @yuyinws
- add in-depth documentation for lazy barrel optimization (#7969) by @shulaoda
- bump theme & update activeMatch for reference (#7963) by @mdong1909
- mark `build()` API as experimental (#7954) by @sapphi-red
- enhance search functionality with improved scoring and filtering logic (#7935) by @hyf0
- add minor comments to multiple types (#7930) by @sapphi-red
- refactor advanedChunks related content to adapt manual code splitting concept (#7925) by @hyf0
- apis: add content to Bundler API page (#7926) by @sapphi-red
- apis: restructure plugin API related docs (#7924) by @sapphi-red
- add plugin API docs (#7923) by @sapphi-red
- apis: add docs to important APIs (#7913) by @sapphi-red
- move the important APIs to the top of the sidebar (#7912) by @sapphi-red
- apis: add more content to CLI documentation (#7911) by @sapphi-red
- apis: generate CLI docs from --help output (#7910) by @sapphi-red
- add fathom analytics (#7896) by @mdong1909

### ⚡ Performance

- use u32 for string indices in string_wizard and rolldown to reduce memory usage (#7989) by @IWANABETHATGUY
- rust: remove all usages of `with_scope_tree_child_ids(true)` for `SemanticBuilder` (#7995) by @Dunqing
- renamer: skip unnecessary nested scope symbol processing (#7899) by @Dunqing
- module_loader: use ArcStr for importer_id to avoid string copy (#7922) by @shulaoda
- module_loader: defer `ModuleTaskOwner` construction until needed (#7921) by @shulaoda
- renamer: optimize symbol renaming by eliminating `rename_non_root_symbol` pass (#7867) by @Dunqing

### 🧪 Testing

- add lazy barrel optimization test cases (#7967) by @shulaoda

### ⚙️ Miscellaneous Tasks

- remove lazy barrel option (#8010) by @shulaoda
- mark watch API as experimental (#8004) by @sapphi-red
- deps: update dependency lodash-es to v4.17.23 [security] (#8001) by @renovate[bot]
- git ignore zed local config (#7988) by @IWANABETHATGUY
- setup publint for published packages (#7972) by @Copilot
- enable `tagged_template_transform ` uncondionally (#7975) by @IWANABETHATGUY
- deps: update oxc to v0.110.0 (#7964) by @renovate[bot]
- deps: update oxc apps (#7962) by @renovate[bot]
- ai: add upgrade-oxc Claude skill (#7957) by @Boshen
- deps: update rollup submodule for tests to v4.55.2 (#7959) by @sapphi-red
- deps: update test262 submodule for tests (#7960) by @sapphi-red
- deps: update crate-ci/typos action to v1.42.1 (#7961) by @renovate[bot]
- deps: update rust crates (#7951) by @renovate[bot]
- deps: update npm packages (#7953) by @renovate[bot]
- deps: update github-actions (#7952) by @renovate[bot]
- deps: update npm packages (#7950) by @renovate[bot]
- format magic-string test before write to disk (#7945) by @IWANABETHATGUY
- deps: update dependency rolldown-plugin-dts to ^0.21.0 (#7915) by @renovate[bot]
- deps: update dependency oxlint-tsgolint to v0.11.1 (#7914) by @renovate[bot]
- deps: update dependency diff to v8.0.3 [security] (#7904) by @renovate[bot]
- remove outdated TODO comment in `collect_depended_symbols` (#7888) by @shulaoda
- deps: update oxc resolver to v11.16.3 (#7876) by @renovate[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants