Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

88
Visualizações
Import of Svelte library not working in online editors but locally

I'm kinda confused how to properly export my own JS library (for Svelte).
When I import the library on a local project (example local project) then everything works just fine, but when I import it in a online editor like Svelte REPL or CodeSandbox it just won't work, because the module can't be found.

The file that exports: https://github.com/DanielSharkov/svelte-router/blob/master/src/index.js

Replication on CodeSandbox: https://codesandbox.io/s/jovial-morning-5o7xr?file=/router.js

To replicate it on Svelte REPL (I can't safe to share it, because of the error):

<script>
    import {SvelteRouter} from '@danielsharkov/svelte-router'
    console.log(SvelteRouter)
</script>

For more details of the library you may inspect the repository: https://github.com/DanielSharkov/svelte-router

The files src/router.js and src/router.mjs aren't in the repository, as these are builds of index.ts.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda