Commit 31c9247
committed
test(ci): smoke-test the ESM bundle under Node's native loader
The existing validate-cjs smoke test loads the bundle with require(), whose CJS
resolver tolerates extensionless subpath imports -- so it never caught the
invalid ESM output that broke Node's native loader. Add an ESM counterpart that
imports dist/es/index.mjs under the native loader and wire it into CI right
after validate-cjs.
Verified: the check passes on a healthy build and fails with ERR_MODULE_NOT_FOUND
when a .js extension is stripped from a dayjs subpath import in the built output.1 parent a36afba commit 31c9247
3 files changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments