Skip to content

Commit 84e28e5

Browse files
xawillgkjohnson
andauthored
Include type declarations in build step (#1271)
* Include type declarations in build step - Fixes #1266 * Indentation fixes, use src types * Remove unneeded copy --------- Co-authored-by: Garrett Johnson <garrett.kjohnson@gmail.com>
1 parent 5e709ec commit 84e28e5

File tree

2 files changed

+33
-9
lines changed

2 files changed

+33
-9
lines changed

package.json

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,38 @@
2323
"build/*"
2424
],
2525
"exports": {
26-
".": "./build/index.js",
27-
"./plugins": "./build/index.plugins.js",
28-
"./core": "./build/index.core.js",
29-
"./three": "./build/index.three.js",
30-
"./r3f": "./build/index.r3f.js",
31-
"./core/plugins": "./build/index.core-plugins.js",
32-
"./three/plugins": "./build/index.three-plugins.js",
33-
"./src/*": "./src/*"
26+
".": {
27+
"import": "./build/index.js",
28+
"types": "./src/index.d.ts"
29+
},
30+
"./plugins": {
31+
"import": "./build/index.plugins.js",
32+
"types": "./src/plugins.d.ts"
33+
},
34+
"./core": {
35+
"import": "./build/index.core.js",
36+
"types": "./src/core/renderer/index.d.ts"
37+
},
38+
"./three": {
39+
"import": "./build/index.three.js",
40+
"types": "./src/three/renderer/index.d.ts"
41+
},
42+
"./r3f": {
43+
"import": "./build/index.r3f.js",
44+
"types": "./src/r3f/index.d.ts"
45+
},
46+
"./core/plugins": {
47+
"import": "./build/index.core-plugins.js",
48+
"types": "./src/core/plugins/index.d.ts"
49+
},
50+
"./three/plugins": {
51+
"import": "./build/index.three-plugins.js",
52+
"types": "./src/three/plugins/index.d.ts"
53+
},
54+
"./src/*": {
55+
"import": "./src/*",
56+
"types": "./src/*.d.ts"
57+
}
3458
},
3559
"scripts": {
3660
"start": "vite --config ./vite.config.js",

src/core/renderer/tiles/TileInternal.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Tile } from './Tile';
1+
import { Tile } from './Tile.js';
22

33
/**
44
* Internal state used/set by the package.

0 commit comments

Comments
 (0)