From df5b4a42939211ae00a4138acec716da6a523608 Mon Sep 17 00:00:00 2001 From: Fabio Pliger Date: Sat, 16 Apr 2022 22:28:24 -0500 Subject: [PATCH] add module config to allow local imports --- pyscriptjs/tsconfig.json | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/pyscriptjs/tsconfig.json b/pyscriptjs/tsconfig.json index b082e968..ebebeeeb 100644 --- a/pyscriptjs/tsconfig.json +++ b/pyscriptjs/tsconfig.json @@ -2,5 +2,28 @@ "extends": "@tsconfig/svelte/tsconfig.json", "include": ["src/**/*"], - "exclude": ["node_modules/*", "__sapper__/*", "public/*"] + "exclude": ["node_modules/*", "__sapper__/*", "public/*"], + "compilerOptions": { + "moduleResolution": "node", + "target": "es2017", + "module": "esnext", + /** + Svelte Preprocess cannot figure out whether you have a value or a type, so tell TypeScript + to enforce using `import type` instead of `import` for Types. + */ + "importsNotUsedAsValues": "error", + "isolatedModules": true, + /** + To have warnings/errors of the Svelte compiler at the correct position, + enable source maps by default. + */ + "sourceMap": true, + /** Requests the runtime types from the svelte modules by default. Needed for TS files or else you get errors. */ + "types": ["svelte"], + + "strict": false, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + } } \ No newline at end of file