Skip to content

Comment on Shrinking my static siteparent

Comments

Well, the article mentions an obvious improvement. The node_moduoes won't be rebuilt after any changes to the code, only changes specific to the packages.json.

Basically the main step is the COPY . . step (previously COPY . /app) which will invalidate the cache every change to the code.

Also that on the builder, the steps beyond npm run are not needed, but well they won't improve much on the performance or space of the overall process.

The node_moduoes won't be rebuilt after any changes to the code, only changes specific to the packages.json.

But that's only if the builder image gets cached and can be reused, right?

Correct.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.