Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve setup of default export and remove svelte/ssr #8516

Merged
merged 12 commits into from
May 5, 2023
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

## Unreleased (4.0)

* **breaking** Minimum supported Node version is now Node 14
* **breaking** Minimum supported webpack version is now webpack 5
* **breaking** Minimum supported TypeScript version is now TypeScript 5 (it will likely work with lower versions, but we make no guarantees about that)
* **breaking** Minimum supported Node version is now Node 14 ((#8482)[https://github.com/sveltejs/svelte/pull/8482])
* **breaking** Minimum supported webpack version is now webpack 5 ((#8515)[https://github.com/sveltejs/svelte/pull/8515])
* **breaking** Minimum supported vite-plugin-svelte version is now 2.1.1. SvelteKit users can upgrade to 1.15.9 or newer to ensure a compatible version ((#8516)[https://github.com/sveltejs/svelte/pull/8516])
benmccann marked this conversation as resolved.
Show resolved Hide resolved
* **breaking** Minimum supported TypeScript version is now TypeScript 5 (it will likely work with lower versions, but we make no guarantees about that) ((#8488)[https://github.com/sveltejs/svelte/pull/8488])
* **breaking** Stricter types for `createEventDispatcher` (see PR for migration instructions) ([#7224](https://github.com/sveltejs/svelte/pull/7224))
* **breaking** Stricter types for `Action` and `ActionReturn` (see PR for migration instructions) ([#7224](https://github.com/sveltejs/svelte/pull/7224))
* **breaking** Stricter types for `onMount` - now throws a type error when returning a function asynchronously to catch potential mistakes around callback functions (see PR for migration instructions) ([#8136](https://github.com/sveltejs/svelte/pull/8136))
Expand Down
13 changes: 2 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@
"import": "./index.mjs",
"require": "./index.js"
},
"node": {
"import": "./ssr.mjs",
"require": "./ssr.js"
},
"import": "./index.mjs",
"require": "./index.js"
"import": "./ssr.mjs",
"require": "./ssr.js"
},
"./compiler": {
"types": "./types/compiler/index.d.ts",
Expand Down Expand Up @@ -78,11 +74,6 @@
},
"./elements": {
"types": "./elements/index.d.ts"
},
"./ssr": {
"types": "./types/runtime/index.d.ts",
"import": "./ssr.mjs",
"require": "./ssr.js"
}
},
"engines": {
Expand Down
5 changes: 1 addition & 4 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ export default [
{
input: {
...runtime_entrypoints,
index: 'src/runtime/index.ts',
ssr: 'src/runtime/ssr.ts'
index: 'src/runtime/index.ts'
benmccann marked this conversation as resolved.
Show resolved Hide resolved
},
output: ['es', 'cjs'].map(
/** @returns {import('rollup').OutputOptions} */
Expand All @@ -50,8 +49,6 @@ export default [
entryFileNames: (entry) => {
if (entry.isEntry) {
if (entry.name === 'index') return `index.${ext}`;
else if (entry.name === 'ssr') return `ssr.${ext}`;

return `${entry.name}/index.${ext}`;
}
},
Expand Down