Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A re-introduction to webpack - DRAFT

Praveen Puglia
April 05, 2018
44

A re-introduction to webpack - DRAFT

Praveen Puglia

April 05, 2018
Tweet

Transcript

  1. Which order though? 1. home.js 2. login.js 3. album.js 4.

    slider.js 5. signup.js 6. social.js 3 2 1 5 6 4 1 3 5 6 4 2 1 2 4 3 6 5
  2. The world of tools • JSMin • YUI Compressor •

    Closure Compiler • UglifyJS • Gulp, Grunt
  3. No Solution • Still concatenating • Human dependent dependency management

    • Serving everything at once • Serving code that wasn’t required
  4. CommonJS // add.js function add (a, b) { return a

    + b } module.exports = add // index.js const add = require('./add') console.log(add(4, 5)) //9
  5. What about us? • Images • Videos • HTML •

    Objects • Templates • … … …
  6. Webpack 4 • #0CJS, Modes, Defaults • Superfast! • CLI

    upgrades • Even better modules & WASM