Closed xenoterracide closed 2 years ago
ok, but shouldn't this setting allow me to import it? I do believe yarn supports ESM now. If not which version do I need?
{
"compilerOptions": {
"esModuleInterop": true,
"target": "ES2018",
"moduleResolution": "node",
"sourceMap": true,
"lib": ["es2018"],
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"declaration": true,
"baseUrl": ".",
"module": "CommonJS",
"allowJs": false,
"checkJs": false,
"noImplicitAny": true,
"declarationMap": true,
"strict": true,
"skipLibCheck": false,
"strictNullChecks": true,
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"noEmit": true
},
"exclude": ["node_modules", "dist"],
"files": []
}
I tried moving to ESM but had an issue with an eslint import rules, which I don't want to get rid of. I dislike typescripts support tbh. I kind of wish typescript would either allow import './foo.ts`` or just transpile import
./footo
./foo.jsbecause
import 'foo.js' was what was screwing the rule because it couldn't find it, because output was not the same directory.
ok, but shouldn't this setting allow me to import it?
if memory serves correctly this is due to an improper dynamic require...