Change8

@sveltejs/package@3.0.0-next.5

Breaking Changes
📦 sveltekitView on GitHub →
1 breaking2 features🐛 3 fixes

Summary

This release introduces a Node.js version requirement of 22 or newer and includes features for improved server-only module handling and import alias transformation. Several bug fixes address issues with file URL resolution, declaration emission, and peer dependency management.

⚠️ Breaking Changes

  • Requires Node.js 22 or newer. Update your Node.js environment to at least version 22.

✨ New Features

  • Warns when using a `.server.` file or a file inside a `server` directory without importing a server-only module.
  • Transforms import aliases into relative imports in files.

🐛 Bug Fixes

  • Resolved an issue where peer dependencies were not imported as file URLs, causing project-relative resolution to fail on Windows.
  • Fixed an issue where declarations were not emitted when the tsconfig file was located above the package root.
  • Declared TypeScript as an optional peer dependency to ensure `svelte-package` functions correctly with strict node-linkers.