Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
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 answers
Answer question

0

You only need to deploy the build folder nothing more.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!