Skip to content

SvelteKit: "SyntaxError: Unexpected token 'export'"Β #1360

@asjir

Description

@asjir

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

πŸ’₯ Demo Page

Explanation

  • What is the expected behavior?
    I expect for the dist/tagify.esm.js to load normally.

  • What is happening instead?
    SvelteKit doesn't render.

  • What error message are you getting?
    SyntaxError: Unexpected token 'export'

Workaround

Thanks to SvelteKit documentation I was able to get it to work by adding "@yaireo/tagify" to ssr.noExternal in vite.config.ts - but docs say it should be a temporary workaround.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions