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

Help me, Obi-Wan Kenobi - A webpack tale

Lukas
November 02, 2018

Help me, Obi-Wan Kenobi - A webpack tale

- history of webpack
- some new feature in webpack v4

Lukas

November 02, 2018
Tweet

More Decks by Lukas

Other Decks in Technology

Transcript

  1. About Me - Software Engineer @ M3 - 13y in

    Japan from Germany - Github: https://github.com/lukasjapan - bt-speaker - Bluetooth speaker Daemon for Raspberry Pi - koreander - Kotlin pug/haml style template engine - Tech I like - Raspberry Pi - Kotlin/Java - Ruby - ...
  2. A long time in a galaxy far far away... -

    Client Side JavaScript - Client Side only in Browser - First appeared in Netscape Navigator 2 (1995) - Server Side JavaScript - Netscape Enterprise Server - ISS (JScript) - ... - ECMA - European Computer Manufacturers Association
  3. Old school JavaScript - Globals everywhere! - Code pieces all

    over the place - Internet Explorer!! - JQuery - the lesser evil
  4. JavaScript gets mature - node.js (2009~) - server side -

    modules - separation of concerns - higher quality of libraries (imo) - reason for javascript success on github - No.1 language - npm / yarn (2010~) - package manager - npm.com
  5. Browserify - 2011~ - node.js modules -> browser - require

    - lots of fixes - filesystem -> browser - process.nextTick - setImmediate - ... - JavaScript bundler - compile multiple files into one - that work in the browser
  6. Then Webpack appears! - opinionated for front end development -

    extensible via plugins - all kinds of assets - files (images, fonts, …) - styles (css, sass) - … - and features - compression - optimization - ...
  7. Webpack brief version history - v0 (2012/3/12) - v1 (2014/2/20)

    - v2 (2017/1/18) - v3 (2017/6/19) - v4 (2018/2/25)
  8. What’s new in general? - plugins everybody used go into

    core - compression - speed improvements, etc - new tech - web assembly - ...
  9. Whats new in v4? (1) - default settings based on

    mode - i.e. no compression in development
  10. Whats new in v4 (3) - chunk strategies in the

    core - SplitChunksPlugin - Always check https://webpack.js.org/configuration/ before Google! - lots of info for old version on google/stack overflow, etc - better use the official webpack config options Reminder