DEV Community

ADONIS SIMO
ADONIS SIMO

Posted on

How to upload webpack bundle to S3 / Cloudfront ?

Hi, I am working with a team on a project using NestJS Framework to build a web application. It uses webpack to build the JS file (app.js) and we include it in the index.html file which is been served to the browser, that app.js file can go to a size of 2Mb and it's been downloaded everytime a page is been displayed.

I was wondering if there is a way to upload that file (app.js) to S3 and serve it from there instead.

Have you ever have such experience in the past ?

Top comments (0)