tagify icon indicating copy to clipboard operation
tagify copied to clipboard

SvelteKit: "SyntaxError: Unexpected token 'export'"

Open asjir opened this issue 1 year ago • 1 comments

Prerequisites

  • [x] I am running the latest version
  • [x] I checked the documentation and found no answer
  • [x] 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.

asjir avatar Jul 04 '24 19:07 asjir

why are you using the esm version of Tagify?

yairEO avatar Aug 28 '24 16:08 yairEO