Skip to content

[Bug]: antd bundle output not correct #5546

@shulaoda

Description

@shulaoda

Reproduction link or steps

See https://stackblitz.com/edit/rolldown-rolldown-starter-stackblitz-a1ok12b5?file=package.json,dist%2Frolldown%2Fentry.js

We’re mainly concerned with whether the file node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/antd/lib/locale/pt_BR.js ends with the line exports.default = localeValues;.

When we run pnpm build and pnpm vite:build, we see that the output bundled by rolldown includes the exports.default = localeValues; line, but the one bundled by rolldown-vite does not.

Using the test plugin, we observed that during the chunk phase, Rolldown's output contains two export.default statements, whereas Vite's output does not.

Additionally, if we modify the following code in node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/antd/lib/locale/pt_BR.js by renaming __esModule to something else like __esModulee (i.e., making it not __esModule), then the Vite output becomes correct.

Object.defineProperty(exports, "__esModule", { 
  value: true
});

All of this worked correctly before #5421.

Any additional comments?

Original issue: vitejs/rolldown-vite#347

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions