I am Sean Larkin. Ask me anything.

View other answers to this thread

Learn Something New Everyday,
Connect With The Best Developers!

Sign Up Now!

& 500k+ others use Hashnode actively.

Anant Kumar's photo

Hi Sean, Thanks for doing this AMA.

Why webpack? How would you explain webpack to a beginner JavaScripter?

Sean Larkin's photo

User Experience Developer

We love using and writing JavaScript modules right? The NodeJs ecosystem even came a long with CommonJS to adopt as the canonical module standard. Now we even have ECMAScript Module (Harmony Module Spec.). But sadly none of these work in the browser completely.

The main and original premesis was two things:

  • Let's you write modules, that get bundled into browser runnable code (as a build step).
  • Let's you split your code into multiple [a]sync bundles at build time to prevent overhead.

In a beginner JavaScripter's world, they probably don't know about:

  • Modules,
  • npm, history of its purpose
  • How we used to build code
  • Why it matters (perf, user experience).

So typically I'd try and shy away from teaching a beginner JavaScripter about webpack at first until they understand a bit more about the language and the importance of shipping minimal code to the browser.

Want to read more?

Browse featured discussions

© 2020 · Hashnode