DEV Community

Marcin Wosinek
Marcin Wosinek

Posted on • Updated on

webpack 5 - benefits of using js bundler

In a previews post we discussed what we can achieve without using js bundler. Let's see now, what benefits we can have by using one.

Short summary

  1. having all js bundled together into one file - which gives us a better performance on production deployment.
  2. simpler imports of npm dependencies. The bundler-free approach works but feels a bit hacky and it's more hassle to maintain.
  3. build-in code optimization applied automatically by webpack
  4. it opens doors for many futures improvements - transpiling code so we can use new language features while supporting older browsers; including styles directly from the app or moving our code base to typescript.

Links

Full discussion

Discussion (0)