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

[examples] Error: Unknown variable dynamic import #1

Open
warren-bank opened this issue Jun 8, 2024 · 0 comments
Open

[examples] Error: Unknown variable dynamic import #1

warren-bank opened this issue Jun 8, 2024 · 0 comments

Comments

@warren-bank
Copy link
Owner

warren-bank commented Jun 8, 2024

when:

  • any/all of the example components are copied into a different Sveltekit project, which:
    • uses @sveltejs/adapter-auto instead of @sveltejs/adapter-static
    • is started in development mode, with: npm run dev or vite dev

fix / workaround:

  • file:
      examples/lib/Details.svelte
    
  • line:
      code = (await import(`../${example}.svelte?raw`)).default
    
  • update:
      code = (await import(/* @vite-ignore */ `../${example}.svelte?raw`)).default
    

why / what's going on?:

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

No branches or pull requests

1 participant