From 08ab7bf95669f6aa70b1fcc2201e0ff796a45db4 Mon Sep 17 00:00:00 2001 From: Tan Li Hau Date: Fri, 23 Oct 2020 09:47:49 +0800 Subject: [PATCH 1/2] add export map --- package.json | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/package.json b/package.json index 6d25f68a2594..cd1bf1d4170d 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,40 @@ "svelte", "README.md" ], + "exports": { + ".": { + "import": "./index.mjs", + "require": "./index.js" + }, + "./compiler": { + "import": "./compiler.mjs", + "require": "./compiler.js" + }, + "./animate": { + "import": "./animate/index.mjs", + "require": "./animate/index.js" + }, + "./easing": { + "import": "./easing/index.mjs", + "require": "./easing/index.js" + }, + "./internal": { + "import": "./internal/index.mjs", + "require": "./internal/index.js" + }, + "./motion": { + "import": "./motion/index.mjs", + "require": "./motion/index.js" + }, + "./store": { + "import": "./store/index.mjs", + "require": "./store/index.js" + }, + "./transition": { + "import": "./transition/index.mjs", + "require": "./transition/index.js" + } + }, "engines": { "node": ">= 8" }, From 82b1f6e5705b32417f8c4380f3a5d983b3ef56e2 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Mon, 9 Nov 2020 10:15:44 -0500 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b36b4357d429..23ce507de93e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * Fix `$$props` and `$$restProps` when compiling to a custom element ([#5482](https://github.com/sveltejs/svelte/issues/5482)) +* Include an export map in `package.json` ([#5556](https://github.com/sveltejs/svelte/issues/5556)) * Fix function calls in `` props that use contextual values ([#5565](https://github.com/sveltejs/svelte/issues/5565)) * Fix handling aborted transitions in `{:else}` blocks ([#5573](https://github.com/sveltejs/svelte/issues/5573)) * Add `Element` and `Node` to known globals ([#5586](https://github.com/sveltejs/svelte/issues/5586))