Skip to content

Commit cbd7f8a

Browse files
committed
docs: update
1 parent 45b3c09 commit cbd7f8a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/in-depth/bundling-cjs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,11 @@ If you find an issue that seems to be caused by this incompatibility, try using
200200

201201
If the heuristic is not working for you, you can use the code in the section above that handles both interpretations. If the import is in a dependency, we recommend to raise an issue to the dependency. In the meantime, you can use [`patch-package`](https://github.com/ds300/patch-package) or [`pnpm patch`](https://pnpm.io/cli/patch) or alternatives as an escape hatch.
202202

203-
### Strict Mode Applied to `.js` files without `"type": "commonjs"` in `package.json`
203+
### Strict Mode Applied to `.js` files
204204

205-
For files ending with `.js` that do not have `"type": "commonjs"` in the closest `package.json`, Rolldown incorrectly parses the file as ESM ([#7009](https://github.com/rolldown/rolldown/issues/7009)). This means that syntaxes only allowed in non-strict mode (sloppy mode) will be rejected.
205+
For files ending with `.js`, Rolldown parses the file as ESM ([#7009](https://github.com/rolldown/rolldown/issues/7009)) without falling back to CJS. This means that syntaxes only allowed in non-strict mode (sloppy mode) will be rejected.
206206

207-
For now, you can change the file extension to `.cjs` or add `"type": "commonjs"` to the closest `package.json` as a workaround.
207+
For now, you can change the file extension to `.cjs` as a workaround.
208208

209209
## Future Plans
210210

0 commit comments

Comments
 (0)