Files
actual/tsconfig.json
Alberto Gasparin cd00da76ef Convert commonjs to esm (#877)
This PR converts everything (aside from electron) from CommonJS to ESM.
It is needed to reduce the changes that will happen during the migration
to Typescript (as TS does not play nice with CJS).

Basically:
- rewrite `require()` to `import`
- rewrite `module.exports` to `exports`
- introduce `ts-node` to run importers so we can convert them to TS too

Lastly, sorry for this larg-ish PR, not my preference but when I tried
to reduce its scope, I would end up with mixed commons/esm that was even
more tricky to handle.
2023-04-10 20:40:40 +01:00

39 lines
1010 B
JSON

{
"references": [
// TODO: enable once every project is ts
// { "path": "./packages/api" },
// { "path": "./packages/desktop-client" }
],
"compilerOptions": {
// "composite": true,
"target": "ES2022",
"lib": ["ES2021", "DOM", "DOM.Iterable"],
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
"downlevelIteration": true,
// TODO: enable once every file is ts
// "strict": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"jsx": "preserve",
// Check JS files too
"allowJs": true,
"checkJs": false,
// Used for temp builds
"outDir": "build",
"moduleResolution": "Node",
"module": "ESNext",
// Until/if we build using tsc
"noEmit": true
},
"include": ["packages/**/*"],
"exclude": ["**/node_modules/*", "**/build/*", "**/lib-dist/*"],
"ts-node": {
"compilerOptions": {
"module": "commonjs"
}
}
}