Skip to content

[Bug]: "use strict" is not injected even if it is written in the entryfile #6879

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

https://repl.rolldown.rs/#eNptjkEKwzAMBL8idPEl+AEu/YkvwbFLiisFW24DwX+v0tDSQy5adiVmtWFCt+FMU1xtuNfdELq/YMCg3mOrEaqUOYjHiydPcV24SLWJGa5gVIwnPY/opLTYByyc88QvsoEpzTcrP/zJ5ug5oDDFNLYssPniCYCbLE3c1wIkLo9RA6MfmiPsu3wGdu1+KiyPEqtgfwNltE1r

What is expected?

The output to be

"use strict";
//#region index.cjs
exports.foo = "foo";

//#endregion

What is actually happening?

The output is:

//#region index.cjs
exports.foo = "foo";

//#endregion

System Info

REPL 1.0.0-beta.47

Any additional comments?

The expected behavior is to be aligned with esbuild (#4557). esbuild appends use strict for the same input (esbuild try).

But I wonder if it's more easier to understand if we add output.strict option (and have it true by default).

related: #5865

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions