Webpacks

R3zk0n · October 2, 2025

Contents

    What is Webpack?

    • https://stackoverflow.com/questions/40562031/webpack-how-does-webpack-work-internally

    Why use Webpack?

    • Traditional Server Rendered Apps
      • Traditionally apps have been server side rendered. This means that a request is made by a client to a server and all the logic is on the server. The server spits out a static html page back to the client which is what they see in their browser. This is why whenever you navigate in old server-side rendered apps you will see the page flash as it refreshes.
    • Single Page Apps - SPAs
      • However nowadays single page applications are all the same page. On a single page application our app is windowed within one url and we never need to refresh. This is considered a nicer experience for the user as it feels slicker not having to refresh. In SPAs if we want to navigate from the home to say the signin page we would navigate to the url for the signin page. However unlike traditional server side rendered pages when the client’s browser makes this request the page will not refresh. Instead the app will dynamically update itself in order to show the signin content. Although this looks like a separate page in our Single Page Application our app just dynamically updates for different pages.
    • Dynamic SPAs mean more code in the browser
      • So in SPAs with all this dynamic content there is way more javascript code that is in the browser. When we say dynamic we are referring to the amount of logic that lives within the client’s browser in the form of javascript. Our server side rendered apps spit out static pages that are not dynamic. The dynamism all happens in the server while generating the static page but once it hits the browser it is relatively static (there isn’t a lot of javascript in it)

    Twitter, Facebook