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)) diff --git a/package.json b/package.json index 75e5c9e21f94..2dda09dcf5b6 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" },