Skip to content

Commit

Permalink
Exports and types fixes v1 (#6624)
Browse files Browse the repository at this point in the history
* cleaned up ts and js config; adds debug and profiler to exports

* set module resolution to node
  • Loading branch information
kpal81xd authored May 24, 2024
1 parent ae37413 commit 1df581f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
19 changes: 7 additions & 12 deletions examples/jsconfig.json
Original file line number Diff line number Diff line change
@@ -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": "es6",
"moduleResolution": "node",
"noImplicitAny": true,
"outDir": "dist",
"strictNullChecks": true,
"target": "es6",
},
"include": ["src", "scripts", "iframe", "utils"],
"exclude": ["node_modules", "src/lib"]
Expand Down
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "types",
"allowJs": true,
"baseUrl": ".",
"checkJs": true,
"module": "es6",
"target": "es6",
"moduleResolution": "node",
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"outDir": "types",
"strictNullChecks": true,
"strictPropertyInitialization": true,
"target": "es6",
"typeRoots": [ "./node_modules/@webgpu/types", "./node_modules/@types" ]
},
"typedocOptions": {
Expand Down

0 comments on commit 1df581f

Please sign in to comment.