Skip to content

Bad compilation of valid Svelte 4 components under Svelte 5 #12254

@arackaf

Description

@arackaf

Describe the bug

Repo is here https://github.com/arackaf/svelte-5-build-debug

Deploy it to Vercel, and you'll see these errors

image

If you check the git history, commit 1c2912b229c7a4efbb41f444e3ee7584f7d7ced5 imports adapter-vercel in order to set edge runtime settings. If you revert that commit, then the deployment suddenly works.

So it looks like adapter-vercel is doing something weird.

Reproduction

See above

Logs

n/a

System Info

System:
    OS: macOS 14.4.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 976.52 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - /usr/local/Cellar/nvm/0.38.0/versions/node/v20.10.0/bin/node
    Yarn: 1.22.22 - /usr/local/Cellar/nvm/0.38.0/versions/node/v20.10.0/bin/yarn
    npm: 10.2.3 - /usr/local/Cellar/nvm/0.38.0/versions/node/v20.10.0/bin/npm
    pnpm: 8.14.0 - /usr/local/Cellar/nvm/0.38.0/versions/node/v20.10.0/bin/pnpm
    bun: 1.0.36 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 126.1.67.119
    Chrome: 126.0.6478.127
  npmPackages:
    svelte: ^5.0.0-next.1 => 5.0.0-next.168

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions