Typescript complains in CJS modules after 3.3.0 (nodenext module resolution)
PSoltes opened this issue · comments
Describe the bug
After upgrading to ^3.3.0 typescript
complains about react-loading-skeleton
being ESM module.
To Reproduce
Relevant tsconfig (most likely nodenext
resolution, causing actual usage of imports
field in pkg.json)
{
"compilerOptions": {
"module": "esnext",
"target": "esnext",
"moduleResolution": "nodenext",
"lib": ["es7", "dom", "ES2019", "ES2021.String"],
"jsx": "preserve",
"allowJs": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"strict": true,
"allowSyntheticDefaultImports": true,
"noEmit": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"isolatedModules": true,
"baseUrl": ".",
"incremental": true
},
}
Actual Behavior
typescript complains
Expected Behavior
typescript should recognize that there is CJS export too.
Versions
- react-loading-skeleton version: ^3.3.0
- typescript version: 5.1.3
- node version: 18.12.0
- Browser version: irrelevant
Additional context
No problems before 3.3.0 (eg. 3.2.1)