Reduces the bundle size of the lambda handler we create for deploying WSO2 application.
As we were mixing some files with IaC code and runtime code, the esbuild adds it to the final bundle.
Probably it only happens because we are bundling to CommonJs, the tree-shaking only works properly in ESModules.
Current bundle size of the WSO2 deployment handler
Bundle size of the WSO2 deployment handler with this fix
Summary
Reduces the bundle size of the lambda handler we create for deploying WSO2 application.
As we were mixing some files with IaC code and runtime code, the esbuild adds it to the final bundle. Probably it only happens because we are bundling to CommonJs, the tree-shaking only works properly in ESModules.
Current bundle size of the WSO2 deployment handler
Bundle size of the WSO2 deployment handler with this fix