From 8db7098682a96351242d25416a94dab286615d22 Mon Sep 17 00:00:00 2001 From: kpal81xd Date: Fri, 24 May 2024 15:18:40 +0100 Subject: [PATCH 1/2] cleaned up ts and js config; adds debug and profiler to exports --- examples/jsconfig.json | 19 +++++++------------ package.json | 13 ++++++++++++- tsconfig.json | 10 +++++----- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/examples/jsconfig.json b/examples/jsconfig.json index 2d8dfb699d3..6e55d721d46 100644 --- a/examples/jsconfig.json +++ b/examples/jsconfig.json @@ -1,20 +1,15 @@ { "compilerOptions": { - "checkJs": true, - "outDir": "dist", - "noImplicitAny": true, - "strictNullChecks": true, - "module": "esnext", - "target": "es2020", "allowJs": true, - "jsx": "react", - "lib": [ - "es2019", - "dom" - ], "allowSyntheticDefaultImports" : true, + "checkJs": true, "esModuleInterop" : true, - "moduleResolution" : "node" + "module": "node16", + "moduleResolution": "node16", + "noImplicitAny": true, + "outDir": "dist", + "strictNullChecks": true, + "target": "es6", }, "include": ["src", "scripts", "iframe", "utils"], "exclude": ["node_modules", "src/lib"] diff --git a/package.json b/package.json index 25923e58fca..9eaed12c152 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,18 @@ "import": "./build/playcanvas/src/index.js", "require": "./build/playcanvas.js" }, - "./build/*": "./build/*" + "./debug": { + "types": "./build/playcanvas.d.ts", + "import": "./build/playcanvas.dbg/src/index.js", + "require": "./build/playcanvas.dbg.js" + }, + "./profiler": { + "types": "./build/playcanvas.d.ts", + "import": "./build/playcanvas.prf/src/index.js", + "require": "./build/playcanvas.prf.js" + }, + "./build/*": "./build/*", + "./scripts/*": "./scripts/*" }, "sideEffects": false, "type": "module", diff --git a/tsconfig.json b/tsconfig.json index 1c42a1a9f81..6b72c2de4dc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,17 +1,17 @@ { "compilerOptions": { - "baseUrl": ".", - "outDir": "types", "allowJs": true, + "baseUrl": ".", "checkJs": true, - "module": "es6", - "target": "es6", - "moduleResolution": "node", + "module": "node16", + "moduleResolution": "node16", "noImplicitReturns": true, "noImplicitThis": true, "noUnusedLocals": true, + "outDir": "types", "strictNullChecks": true, "strictPropertyInitialization": true, + "target": "es6", "typeRoots": [ "./node_modules/@webgpu/types", "./node_modules/@types" ] }, "typedocOptions": { From c2a5c249d86fdf25be906319cbacbed10f0e4ffe Mon Sep 17 00:00:00 2001 From: kpal81xd Date: Fri, 24 May 2024 15:26:04 +0100 Subject: [PATCH 2/2] set module resolution to node --- examples/jsconfig.json | 4 ++-- tsconfig.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/jsconfig.json b/examples/jsconfig.json index 6e55d721d46..de901df92ec 100644 --- a/examples/jsconfig.json +++ b/examples/jsconfig.json @@ -4,8 +4,8 @@ "allowSyntheticDefaultImports" : true, "checkJs": true, "esModuleInterop" : true, - "module": "node16", - "moduleResolution": "node16", + "module": "es6", + "moduleResolution": "node", "noImplicitAny": true, "outDir": "dist", "strictNullChecks": true, diff --git a/tsconfig.json b/tsconfig.json index 6b72c2de4dc..93aa0128c48 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,8 +3,8 @@ "allowJs": true, "baseUrl": ".", "checkJs": true, - "module": "node16", - "moduleResolution": "node16", + "module": "es6", + "moduleResolution": "node", "noImplicitReturns": true, "noImplicitThis": true, "noUnusedLocals": true,