Ideas for Arc XP

Webpack Build process: Allow for larger dependancies or references

With deferred loading of modules, it allows for us to use more node packages and dependancies without growing our bundle.

We were very excited to get a React Native app into our web app and only load the items for that app on the pages/components that need it. However loading in the React Native environment exceeds the 512Mb Lambda limit.


This is a cap we are going to keep encountering, especially as we grow our usage of deferred bundles and the functionality of our website. It would be nice if we could provide references, or download these files into S3 or somewhere where the build limitations do not stop us from building our application.


Thanks for consideration

  • Michael Newman
  • Feb 24 2022
  • Will not implement
  • Attach files
  • Admin
    Fatih Yildiz commented
    March 01, 2022 22:18

    Hi Michael,


    Thanks for submitting this idea. We have reviewed this with the team and even though the Lambda limit can be increased with a re-architecting how we deploy lambdas, the 250mb unzipped bundle content (including dependencies) is a healthy limit for Engine lambda runtime. The 512mb limit is the lambda runtime space with the temp files which is not the limit can be used for the node dependencies.


    A common practice other arc clients with larger node modules do is to have their own packagers (i.e: webpack) to bundle their dependencies to javascript-only modules with only modules they use. This will generally produce much smaller bundle size that will be easily loaded and running in labmda.

    We don't know how this would look like with using react-native web but it's best practice to keep lambda runtime only include the javascript-only content (react native contains a lot of mobile native code java/obj-c) and optimized to be the bundled javascript if there are many modules in use. That's why having a bundle over 250mb lambda hard limit will most likely be not efficient and may result timeouts at page render time.