diff --git a/components.d.ts b/components.d.ts index eaae2efbe..927d75cc4 100644 --- a/components.d.ts +++ b/components.d.ts @@ -1 +1 @@ -export * from './dist/src/components/index.js' +export * from './dist/components.js' diff --git a/composables.d.ts b/composables.d.ts index 365506fb3..e662c9946 100644 --- a/composables.d.ts +++ b/composables.d.ts @@ -1 +1 @@ -export * from './dist/src/composables/index.js' +export * from './dist/composables.js' diff --git a/package.json b/package.json index fed187e84..2e23839cd 100644 --- a/package.json +++ b/package.json @@ -20,27 +20,30 @@ "sideEffects": false, "exports": { ".": { - "types": "./dist/index.d.ts", + "types": "./dist/tres.d.ts", "import": "./dist/tres.js", - "require": "./dist/tres.umd.cjs" + "require": "./dist/tres.cjs" }, "./components": { - "types": "./dist/src/components/index.d.ts" + "types": "./dist/components.d.ts", + "default": "./dist/components.js" }, "./composables": { - "types": "./dist/src/composables/index.d.ts" + "types": "./dist/composables.d.ts", + "default": "./dist/composables.js" }, "./types": { - "types": "./dist/src/types/index.d.ts" + "types": "./dist/types.d.ts" }, "./utils": { - "types": "./dist/src/utils/index.d.ts" + "types": "./dist/utils.d.ts", + "default": "./dist/utils.js" }, "./*": "./*" }, - "main": "./dist/tres.js", + "main": "./dist/tres.cjs", "module": "./dist/tres.js", - "types": "./dist/index.d.ts", + "types": "./dist/tres.d.ts", "files": [ "*.d.ts", "dist" @@ -61,7 +64,7 @@ "docs:serve": "vitepress serve docs", "docs:preview": "vitepress preview docs", "docs:contributors": "esno scripts/update-contributors.ts", - "test:attw": "attw --pack --ignore-rules cjs-resolves-to-esm" + "test:attw": "attw --pack --ignore-rules false-esm --ignore-rules cjs-resolves-to-esm" }, "peerDependencies": { "three": ">=0.133", diff --git a/types.d.ts b/types.d.ts index 9551693c9..26a125423 100644 --- a/types.d.ts +++ b/types.d.ts @@ -1 +1 @@ -export * from './dist/src/types/index.js' +export * from './dist/types.js' diff --git a/utils.d.ts b/utils.d.ts index 3143f3664..e3f344e48 100644 --- a/utils.d.ts +++ b/utils.d.ts @@ -1 +1 @@ -export * from './dist/src/utils/index.js' +export * from './dist/utils.js' diff --git a/vite.config.ts b/vite.config.ts index 263b3a275..70133979e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -48,9 +48,14 @@ export default defineConfig({ }, build: { lib: { - entry: resolve(__dirname, 'src/index.ts'), + entry: { + tres: resolve(__dirname, 'src/index.ts'), + components: resolve(__dirname, 'src/components/index.ts'), + composables: resolve(__dirname, 'src/composables/index.ts'), + types: resolve(__dirname, 'src/types/index.ts'), + utils: resolve(__dirname, 'src/utils/index.ts'), + }, name: 'tres', - fileName: 'tres', }, watch: { include: [resolve(__dirname, 'src')],