serverless-esbuild icon indicating copy to clipboard operation
serverless-esbuild copied to clipboard

Hooks for pruning external deps before zipping

Open alexcroox opened this issue 2 years ago • 0 comments

I have a large dependancy that requires pruning npm run prune inside it's node_modules folder.

I think the way serverless-esbuild works is that it re-installs external deps rather than copying across the already installed folder from node_modules.

This means if I've already pruned after my normal npm install, I still end up with the full dependency folder in .esbuild/.build because this plugin re-installs.

Therefore if I could run a script at the point esbuild has done it's npm install, and just before it packages it all up into a zip, I could re-run my prune command.

alexcroox avatar Oct 12 '22 14:10 alexcroox