natemoo-re / microsite

Do more with less JavaScript. Microsite is a smarter, performance-obsessed static site generator powered by Preact and Snowpack.

Home Page:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Package size is quite big

Siilwyn opened this issue · comments


The package install size 160 MB. Reducing the size will help install speed and save some bandwidth.

Perhaps there are lighter alternatives that can achieve the same, or maybe some dependencies are only development dependencies?

The biggest packages when I install microsite locally on Linux:

Thank you! I really appreciate issues like this. I will absolutely be focusing on reducing the Microsite's installation footprint.

  • There's no (good) reason for prettier to be in there, I can remove that easily
  • Users should be prompted to install postcss locally, similar to Next.js

Honestly I think that will take most of the packages in this list out of the equation.

Here is the packagephobia report on the old dependencies, and the packagephobia report on the new dependencies.

I removed the following direct dependencies in v1.1.0 (see #94), which should also remove most of the nested dependencies from your screenshot:

  • prettier 8.66MB
  • postcss-preset-env 6.45MB
  • postcss-cli 2.62MB
  • postcss 1.03MB
  • @snowpack/plugin-postcss 246kB
  • postcss-flexbugs-fixes 9.18kB
  • Total 19.02MB

This is something I'll be paying more attention to moving forward. Currently Microsite is just compiled with tsc, but I'm sure using Rollup to bundle and treeshake would help significantly. Once that's setup I can probably cut down the dependencies to snowpack and preact.

I'm going to close this and track future improvements in #95.

ezoic increase your site revenue