diff --git a/package.json b/package.json index 7453370..684ec54 100644 --- a/package.json +++ b/package.json @@ -19,11 +19,11 @@ ], "exports": { ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/spk-library.es.js" - } - } + "types": "./dist/index.d.ts", + "import": "./dist/spk-library.es.js", + "require": "./dist/spk-library.umd.js" + }, + "./dist/style.css": "./dist/style.css" }, "main": "./dist/spk-library.umd.js", "module": "./dist/spk-library.es.js", diff --git a/vite.config.ts b/vite.config.ts index 0f14ee4..37475a9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -14,7 +14,10 @@ export default defineConfig({ dts({ insertTypesEntry: true, include: ['src'], - outDir: 'dist' + outDir: 'dist', + rollupTypes: true, + // Make sure type declarations are copied properly + copyDtsFiles: true, }), ], test: {