Bladeren bron

fix: package exports types

alvarosabu 2 jaren geleden
bovenliggende
commit
6fa3e09882
3 gewijzigde bestanden met toevoegingen van 8 en 8 verwijderingen
  1. 6 6
      package.json
  2. 1 1
      playground/src/components/TheExperience.vue
  3. 1 1
      playground/tsconfig.json

+ 6 - 6
package.json

@@ -14,18 +14,18 @@
   "types": "./dist/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/index.d.ts",
       "import": "./dist/tres.js",
       "require": "./dist/tres.umd.cjs"
     },
-    "./types": {
-      "require": "./dist/index.d.ts",
-      "import": "./dist/index.d.ts"
-    },
     "./components": {
       "types": "./dist/types/tres-components.d.ts"
     },
-    "./styles": "./dist/style.css",
-    "./*": "./dist/tres.js"
+    "./*": {
+      "types": "./dist/types/*",
+      "import": "./dist/tres.js",
+      "require": "./dist/tres.umd.cjs"
+    }
   },
   "publishConfig": {
     "access": "public"

+ 1 - 1
playground/src/components/TheExperience.vue

@@ -1,7 +1,7 @@
 <script setup lang="ts">
 import { ref, watchEffect } from 'vue'
 import { BasicShadowMap, SRGBColorSpace, NoToneMapping } from 'three'
-import { TresCanvas } from '/@/'
+import { TresCanvas } from '@tresjs/core'
 import TheSphere from './TheSphere.vue'
 import { OrbitControls } from '@tresjs/cientos'
 

+ 1 - 1
playground/tsconfig.json

@@ -3,7 +3,7 @@
     "target": "ESNext",
     "useDefineForClassFields": true,
     "module": "ESNext",
-    "moduleResolution": "Node",
+    "moduleResolution": "bundler",
     "strict": true,
     "jsx": "preserve",
     "resolveJsonModule": true,