From 6bbc3324284648e3fc6b583d5006bd88b4ede482 Mon Sep 17 00:00:00 2001 From: Sebastian <43414545+RealSocius@users.noreply.github.com> Date: Wed, 15 May 2024 06:23:07 +0200 Subject: [PATCH] fix(package): add exports map (#23) Fixes #22 --- package.json | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 4d77ffe..a5be288 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,24 @@ "license": "MIT", "description": "Declarative pin code component for Svelte", "author": "Eric Liu (https://github.com/metonym)", - "svelte": "./src/index.js", - "main": "./src/index.js", - "types": "./src/index.d.ts", - "sideEffects": false, + "svelte": "./index.js", + "main": "./index.js", + "types": "./index.d.ts", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./index.js", + "svelte": "./index.js" + }, + "./*.svelte": { + "types": "./*.svelte.d.ts", + "import": "./*.svelte" + }, + "./unstyled/*.svelte": { + "types": "./unstyled/*.svelte.d.ts", + "import": "./*.svelte" + } + }, "scripts": { "dev": "rollup -cw", "predeploy": "rollup -c",