Skip to content

[Bug]: output.inlineDynamicImports warning is always output when bundling to IIFE format #2832

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

  1. Open https://stackblitz.com/edit/github-xv4yss-saxidd?file=rolldown.config.mjs
  2. npm run build runs automatically
  3. See [INVALID_OPTION] Error: Invalid value "iife" for option "output.format" - UMD and IIFE are not supported for code splitting. You may set `output.inlineDynamicImports` to `true` when using dynamic imports. output

What is expected?

No error or warning is output when the bundle does not require code splitting.

What is actually happening?

[INVALID_OPTION] Error: Invalid value "iife" for option "output.format" - UMD and IIFE are not supported for code splitting. You may set `output.inlineDynamicImports` to `true` when using dynamic imports. error is always output for IIFE format.

System Info

Stackblitz

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    rolldown: https://pkg.pr.new/rolldown@01cedb9 => 0.14.0

Any additional comments?

Found while trying to upgrade rolldown in rolldown-vite.

Metadata

Metadata

Assignees

Labels

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions