@sveltejs/kit 1.22.0 → 1.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "1.22.0",
3
+ "version": "1.22.1",
4
4
  "description": "The fastest way to build Svelte apps",
5
5
  "repository": {
6
6
  "type": "git",
@@ -541,8 +541,14 @@ function kit({ svelte_config }) {
541
541
  // see the kit.output.preloadStrategy option for details on why we have multiple options here
542
542
  const ext = kit.output.preloadStrategy === 'preload-mjs' ? 'mjs' : 'js';
543
543
 
544
+ // We could always use a relative asset base path here, but it's better for performance not to.
545
+ // E.g. Vite generates `new URL('/asset.png', import.meta).href` for a relative path vs just '/asset.png'.
546
+ // That's larger and takes longer to run and also causes an HTML diff between SSR and client
547
+ // causing us to do a more expensive hydration check.
548
+ const client_base = kit.paths.relative || kit.paths.assets ? './' : kit.paths.base || '/';
549
+
544
550
  new_config = {
545
- base: ssr ? assets_base(kit) : './',
551
+ base: ssr ? assets_base(kit) : client_base,
546
552
  build: {
547
553
  copyPublicDir: !ssr,
548
554
  cssCodeSplit: true,
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // generated during release, do not modify
2
2
 
3
3
  /** @type {string} */
4
- export const VERSION = '1.22.0';
4
+ export const VERSION = '1.22.1';