Skip to content

[Bug]: Useless empty JS file for CSS #4259

@ocavue

Description

@ocavue

Reproduction link or steps

https://github.com/issueset/test-rolldown-esbuild-css

What is expected?

Only main.js and style.css are emitted, like what ESBuild provides:

dist/output_esbuild
├── main.js
└── style.css

What is actually happening?

An empty file style.js is emitted.

dist/output_rolldown
├── main.js
├── style.css
└── style.js

System Info

System:
    OS: macOS 15.3.1
    CPU: (8) arm64 Apple M2
    Memory: 100.06 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.18.1 - /opt/homebrew/opt/node@20/bin/node
    Yarn: 1.22.22 - /opt/homebrew/opt/node@20/bin/yarn
    npm: 10.8.2 - /opt/homebrew/opt/node@20/bin/npm
    pnpm: 10.8.1 - /opt/homebrew/bin/pnpm
    bun: 1.2.9 - /opt/homebrew/bin/bun
  Browsers:
    Brave Browser: 122.1.63.169
    Chrome: 135.0.7049.114
    Chrome Canary: 137.0.7139.0
    Safari: 18.3
    Safari Technology Preview: 18.2
  npmPackages:
    rolldown: 1.0.0-beta.8 => 1.0.0-beta.8

Any additional comments?

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions