Skip to content

fix: build failure with Svelte 5.53.5 due to mixed type import in Main.svelte #461

@jeffmaury

Description

@jeffmaury

Problem

PR #437 (chore(deps-dev): bump svelte from 5.46.3 to 5.53.5) fails the CI build with:

[plugin vite-plugin-svelte:compile] packages/webview/src/Main.svelte:8:20
RolldownError: Unexpected token
https://svelte.dev/e/js_parse_error
  6 |  import { onDestroy, onMount } from 'svelte';
  7 |  
  8 |  import { Main, type MainContext } from './main';
                            ^

Root Cause

Svelte 5.53.5 no longer supports mixed value+type imports (import { Value, type Type }) inside <script> blocks in .svelte files.

Only packages/webview/src/Main.svelte is affected — all other .svelte files already use pure import type { ... } syntax.

Fix

Split the mixed import into two separate statements in packages/webview/src/Main.svelte:

- import { Main, type MainContext } from './main';
+ import { Main } from './main';
+ import type { MainContext } from './main';

Related: #437

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions