Commit 7868c48
committed
fix: suppress TS1192 for CJS-type npm packages on TS 6.0 / Deno v2.8.3
Deno v2.8.3 upgraded TypeScript from 5.9.2 to 6.0.3. TS 6.0 changed \export =\ in ESM context from a warning (TS1203) to a hard error (TS1192): \Module has no default export\.
\@prefresh/vite\ and \@tailwindcss/postcss\ both publish \.d.ts\ files using \export =\ (CJS syntax), but their \exports.import\ condition declares ESM support. With Deno's default \moduleResolution: NodeNext\, TS 6.0 sees \exports.import\ and treats the \.d.ts\ as ESM — where \export =\ is now an error.
This is reproducible against stock \ sc --moduleResolution NodeNext\ and is not a Deno bug. The runtime import works correctly (Deno handles CJS→ESM interop). The upstream packages' type declarations and package.json metadata are self-contradictory.
Temporary fix: \@ts-ignore TS1192\ with a comment explaining the situation. Upstream issues should be filed for both packages to resolve the \export =\ vs \exports.import\ inconsistency.1 parent 86d6cde commit 7868c48
2 files changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments