Skip to content

Commit 2494fd5

Browse files
authored
Fix Svelte version import (#2002)
* Fix Svelte version import * Update changelog
1 parent 043c468 commit 2494fd5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ For changes prior to v1.0.0, see the [legacy releases](https://legacy.inertiajs.
99

1010
## [Unreleased](https://github.com/inertiajs/inertia/compare/v1.3.0-beta.1...HEAD)
1111

12-
- Nothing yet!
12+
- Fix Svelte version import ([#2002](https://github.com/inertiajs/inertia/pull/2002))
1313

1414
## [v1.3.0-beta.1](https://github.com/inertiajs/inertia/compare/v1.2.0...v1.3.0-beta.1)
1515

packages/svelte/src/createInertiaApp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { router, setupProgress, type InertiaAppResponse, type Page } from '@inertiajs/core'
22
import escape from 'html-escape'
33
import type { ComponentType } from 'svelte'
4-
import { VERSION } from 'svelte/compiler'
4+
import { version as SVELTE_VERSION } from 'svelte/package.json'
55
import App from './components/App.svelte'
66
import store from './store'
77
import type { ComponentResolver, ResolvedComponent } from './types'
@@ -52,7 +52,7 @@ export default async function createInertiaApp({
5252
})
5353

5454
if (isServer) {
55-
const isSvelte5 = VERSION.startsWith('5')
55+
const isSvelte5 = SVELTE_VERSION.startsWith('5')
5656
const { html, head, css } = await (async () => {
5757
if (isSvelte5) {
5858
const { render } = await dynamicImport('svelte/server')

0 commit comments

Comments
 (0)