8000 GitHub · Where software is built
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Failed to statically analyse src/routes/ Unexpected token error for loader with async generic function #13809
Open
@minht11

Description

@minht11

Describe the bug

After #13684 I get Failed to statically analyse when I have additional function with generics:

// import {} from './config'

const loadDataWithGeneric = async <T>() => {};

export const load = () => {};

Comment is needed as well, to trigger it.

Reproduction

Reproduction

Logs

SyntaxError: Failed to statically analyse src/routes/(app)/+layout.ts. Unexpected token (3:40)
...
acorn/dist/acorn.mjs:596:15) {
  pos: 70,
  loc: Position { line: 3, column: 40 },
  raisedAt: 72
}

System Info

npmPackages:
    @sveltejs/adapter-static: ^3.0.8 => 3.0.8 
    @sveltejs/kit: ^2.21.1 => 2.21.1 
    @sveltejs/vite-plugin-svelte: 5.0.3 => 5.0.3 
    rolldown-vite:  6.3.10 
    svelte: ^5.31.1 => 5.31.1

Severity

blocking an upgrade

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0