Commit 7c85aee
committed
This PR partially reverts #8455. `.js` with the closest `package.json` with `"type": "commonjs"` will now be parsed as ESM for now as that caused tests in Vite repo to fail. For example:
```
[PARSE_ERROR] Error: Cannot use import statement outside a module
╭─[ node_modules/.pnpm/@babel[email protected]/node_modules/@babel/runtime/helpers/esm/slicedToArray.js:1:1 ]
│
1 │ import arrayWithHoles from "./arrayWithHoles.js";
│ ───┬──
│ ╰────
───╯
```
1 parent 061a9b3 commit 7c85aee
File tree
7 files changed
+5
-48
lines changed- crates/rolldown
- src/utils
- tests
- rolldown/issues/7009/js_type_commonjs
- snapshots
- docs/in-depth
7 files changed
+5
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 25 | + | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | | - | |
| 29 | + | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
| |||
Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4896 | 4896 | | |
4897 | 4897 | | |
4898 | 4898 | | |
4899 | | - | |
4900 | | - | |
4901 | | - | |
4902 | | - | |
4903 | 4899 | | |
4904 | 4900 | | |
4905 | 4901 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
0 commit comments