diff --git a/CHANGELOG.md b/CHANGELOG.md index a3fb361e5f..b93a6a7fd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * 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)) +* Fix internal `import`s so that we're exposing a valid ES module ([#5617](https://github.com/sveltejs/svelte/issues/5617)) ## 3.29.4 diff --git a/rollup.config.js b/rollup.config.js index 82a2b9ae34..e9ee666337 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -30,12 +30,12 @@ export default [ { file: `index.mjs`, format: 'esm', - paths: id => id.startsWith('svelte/') && `${id.replace('svelte', '.')}` + paths: id => id.startsWith('svelte/') && `${id.replace('svelte', '.')}/index.mjs` }, { file: `index.js`, format: 'cjs', - paths: id => id.startsWith('svelte/') && `${id.replace('svelte', '.')}` + paths: id => id.startsWith('svelte/') && `${id.replace('svelte', '.')}/index.js` } ], external, @@ -50,12 +50,12 @@ export default [ { file: `${dir}/index.mjs`, format: 'esm', - paths: id => id.startsWith('svelte/') && `${id.replace('svelte', '..')}` + paths: id => id.startsWith('svelte/') && `${id.replace('svelte', '..')}/index.mjs` }, { file: `${dir}/index.js`, format: 'cjs', - paths: id => id.startsWith('svelte/') && `${id.replace('svelte', '..')}` + paths: id => id.startsWith('svelte/') && `${id.replace('svelte', '..')}/index.js` } ], external,