Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Let's dive in!
## What's new in SvelteKit

- You can now pass your SvelteKit config directly to the Vite plugin, so a separate `svelte.config.js` is no longer required, as a preview of how Kit 3 will require config to live in `vite.config.js` (**2.62.0**, [Docs](https://svelte.dev/docs/kit/configuration), [#15944](https://github.com/sveltejs/kit/pull/15944))
- Experimental explicit environment variables let you declare and type your env vars in one place, as a preview of how `$env/*` will work in SvelteKit 3 (**2.63.0**, [Docs](https://svelte.dev/docs/kit/environment-variables#Explicit-environment-variables), [#15934](https://github.com/sveltejs/kit/pull/15934))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This id doesn't exist on the version-3 branch so we may as well get rid of it

- Experimental explicit environment variables let you declare and type your env vars in one place, as a preview of how `$env/*` will work in SvelteKit 3 (**2.63.0**, [Docs](https://svelte.dev/docs/kit/environment-variables), [#15934](https://github.com/sveltejs/kit/pull/15934))
- Remote function commands can now receive `File` objects directly, so you can upload files without manually wrapping them in `FormData` (**2.64.0**, [Docs](https://svelte.dev/docs/kit/remote-functions#command), [#15978](https://github.com/sveltejs/kit/pull/15978))
- Remote queries can now refresh other queries, making it easier to invalidate related data after a mutation (**2.65.0**, [Docs](https://svelte.dev/docs/kit/remote-functions#query-Refreshing-queries), [#16012](https://github.com/sveltejs/kit/pull/16012))
- Prerendered `.md` and `.mdx` files are now precompressed alongside HTML, JS and CSS for faster delivery (**2.66.0**, [Docs](https://svelte.dev/docs/kit/adapter-static#Options-precompress), [#15893](https://github.com/sveltejs/kit/pull/15893))
Expand Down
15 changes: 1 addition & 14 deletions apps/svelte.dev/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,7 @@ const config: UserConfig = {
}
},
build: {
cssMinify: 'lightningcss',
rollupOptions: {
output: {
banner: (chunk) => {
// this monstrosity is required for twoslash (which uses `require`) to work during prerendering.
// it is brittle and may not work in perpetuity but i'm not sure what a better solution would be
if (chunk.type === 'chunk' && chunk.name === 'renderer') {
return `import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);`;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workaround is no longer needed and is causing this build error https://vercel.com/svelte/svelte-dev/3do19ZkuWZBoM6FUC4fxDnJTzoRT#L682

}

return '';
}
}
}
cssMinify: 'lightningcss'
},
server: {
fs: { allow: ['../../packages', '../../node_modules', '../../../KIT/kit/packages/kit'] },
Expand Down