From f7bddb23d3ee9ff2feaa52cb1763a17de6103a04 Mon Sep 17 00:00:00 2001 From: Tan Li Hau Date: Mon, 9 Nov 2020 22:57:40 +0800 Subject: [PATCH] add extension to request to support webpack 5 (#5624) --- CHANGELOG.md | 1 + rollup.config.js | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) 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,