Skip to content

[Bug]: __name lacks require('./chunk-containing-runtime') when format: 'cjs' + keepNames: true #5525

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

https://repl.rolldown.rs/#eNqVkLFuwyAQhl/lxOLFpW67IXXp0LFPkIXaR5XW5izAbSTEu/eAOLGSLBmQ+H+Ou+/+KIxQUeztgAcZfL5boc66FX2W00wuQIR3ItAe3rSDBMbRBI18NERc2uzczuaDh1Lcj9r78iGuL+miJNZG2eFBKFRwC6ZWOBrHgf6s7Mma/deG68ZLJWTteWZx4ZVHWoAfxPlDT+gV5MZt9mgJ8xJULQAw5CbNsum/eQG2Uqa0J8IBjV7GtbFgtrrsynNUleF68boa/yp5Pl8GXIx7Ej6DbdNld8u8prrNlBF+ecqT7GT38IlBy5dOpH+sBauU

What is expected?

The output (index.js) to be:

const require_foo = require('./foo-DAY-4e9l.js');

//#region index.ts
var Foo$1 = class {
	static {
		require_foo.__name(this, "Foo");
	}
};

//#endregion
exports.Bar = require_foo.Foo;
exports.Foo = Foo$1;

What is actually happening?

The output (index.js) is:

const require_foo = require('./foo-DAY-4e9l.js');

//#region index.ts
var Foo$1 = class {
	static {
		__name(this, "Foo");
	}
};

//#endregion
exports.Bar = require_foo.Foo;
exports.Foo = Foo$1;

System Info

REPL 1.0.0-beta.30

Any additional comments?

No response

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions