Christos Sotiriou
1 min readJun 16, 2019

--

I am not quite sure I follow…

nodeExternals will actually make sure that node_modules will not be bundled inside your final output. They will be loaded like a relative `require()` in both production and development.

It is logical to have a MUCH larger webpack build in production since you don’t use nodeExternals in production — which leaves me wondering why did you choose to go down this road.

My server actually works by using nodeExternals in both development and production mode. The bundle output contains only my code and not any third party code. When building for production in my CI, I always do an “npm install” so the node_modules folder is present in production.

--

--

Christos Sotiriou

Principal Software Engineer, currently @ Vodafone GR. Crafting apps & web services since 2007. https://oramind.com