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)

Cloudinary image

Video API: manage, encode, and optimize for any device, channel or network condition. Deliver branded video experiences in minutes and get deep engagement insights.

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay