Skip to content

"use strict" is not injected for CJS builds #5865

@victordidenko

Description

@victordidenko

I've seen #4607, but I feel it's important to bring this up again.

I think this decision is quite unfortunate.

Is the expectation that developers will add 'use strict' to their ESM/TS source code when dual-bundling as ESM/CJS? Including 'use strict' in ESM code seems counterproductive.

An alternative might be to add 'use strict' to CJS files by default when "type": "module" is used and bundling for CJS.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions