Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
asjir opened this issue Jul 4, 2024 · 1 comment
Open
3 tasks done

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

asjir opened this issue Jul 4, 2024 · 1 comment

Comments

@asjir
Copy link

asjir commented Jul 4, 2024

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.

@yairEO
Copy link
Owner

yairEO commented Aug 28, 2024

why are you using the esm version of Tagify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants