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

104
Visualizações
Reduce size of sveltekit app deployed with node-adapter

I have written a sveltekit app that I would like to deploy for instance on AlwaysData.

On the AlwaysData servers I can use up to 100Mo. I thought this would be plenty for the very small app I have written. But it is not the case : my app is more than 400Mo.

I looked into it and noticed two things :

  • after building the app, there still remains a node_modules folder that is not bundled into the app.
  • this node_modules folder is more than 400Mo although I only use a few simple libraries.

Hence my question:

  • is there a way to bundle the node_module packages into my app? This would keep only the necessary stuff which is only a few kilobytes.
  • or is there a way to tell javascript to import the minified version of the package in the dist folder when in production.

Following are the libraries I use and the size they should be according to bundlephobia :

  • @primsa/client : 233B
  • @supercharge/request-ip : 3.8kB
  • axios : 17.6kB
  • ramda : 53.4kB
  • sprintf-js : 3.5kB

So how does an app that should take less than a 100kB end up taking 400MB ? Even from an environmental point of view, this looks a bit annoying...

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You only need to deploy the build folder nothing more.

about 4 years ago · Juan Pablo Isaza Relatório
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