Open dylanjha opened 3 weeks ago
@dylanjha what is the moduleResolution
?
@luwes @dylanjha filed this for me. Here is the tsconfig.json
compiler options:
{
"compilerOptions": {
"allowImportingTsExtensions": false,
"allowJs": true,
"allowSyntheticDefaultImports": true,
"checkJs": true,
"declaration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"incremental": false,
"isolatedModules": true,
"jsx": "react-jsx",
"lib": ["esnext", "dom", "dom.iterable"],
"module": "NodeNext",
"moduleDetection": "force",
"moduleResolution": "NodeNext",
"noEmit": true,
"preserveWatchOutput": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "es2022",
"verbatimModuleSyntax": true
}
}
I tested the tsconfig above with a fresh Vite app and I can't reproduce it unfortunately.
Are you using a framework? Could you try restarting the TS server? sometimes that acts strangely when (re)installing node_modules.
Is there an existing issue for this?
Which Mux Elements/Packages does this apply to? Select all that apply
mux-player-react
Which browsers are you using?
Other (add details below)
Which operating systems are you using?
macOS
Description
A simple react component like this:
Gives us the following TypeScript error with modern ESModules and a strict TypeScript config:
Reduced test case
No response
Steps to reproduce
Try reproducing this with a strict TS Config
Current Behavior
Error building
Expected Behavior
No error building
Errors
No response
What version of the package are you using?
No response