Skip to content

[Bug]: "use strict" in a function is stripped #6880

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

https://repl.rolldown.rs/#eNptjtEKwjAMRX8l5KUKYx8w8E/2UrpWKjUZbaqD0X83VZQ9+JJwbsK9d8eA046RFr+N7lY6EE4HYUCn7LeVs5QxMMMFQiUnkQns6Qz7TACmFg9FcnRiOmcvNRMY/VduM6mPx0ly9W3AzCkt/KTRMYV4HeWX++dyLACLD7Ym0dDcY7jKWmX6IkDgfLcqGK1uPmLr6z2wafZDzZIVXwTbC0ipVdw=

What is expected?

The output to be:

//#region index.cjs
exports.foo = function a() {
	"use strict";
	return "foo";
};

//#endregion

What is actually happening?

The output is:

//#region index.cjs
exports.foo = function a() {
	return "foo";
};

//#endregion

System Info

1.0.0-beta.47

Any additional comments?

Maybe related to #6879

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions