Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save theednaffattack/ae6304695a9b17db26217775f4f879cf to your computer and use it in GitHub Desktop.
Save theednaffattack/ae6304695a9b17db26217775f4f879cf to your computer and use it in GitHub Desktop.
Cursed TS Config (Error [ERR_REQUIRE_ESM]: Must use import to load ES Module:)
{
"compilerOptions": {
"target": "ES2019",
"module": "commonjs",
"lib": ["es2020"],
"sourceMap": true,
"outDir": "./dist",
"moduleResolution": "node",
"declaration": false,
"resolveJsonModule": true,
"composite": false,
"removeComments": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"baseUrl": ".",
"rootDir": "./src"
},
"exclude": ["node_modules"],
"include": ["./src/**/*.tsx", "./src/**/*.ts"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment