Webpack – More than minification



Webpack – More than minification

0 1


webpack-presentation

Webpack lightning talk

On Github kurtharriger / webpack-presentation

Webpack

More than minification

Created by Kurt Harriger

Webpack is a module bundler

A build task to preprocess javascript and css files to generate static assets for production:

  • Compilers
  • Linting
  • Concatenation
  • Minification

Webpack delivers more

In addition to all the things you need, webpack delivers more:

  • Dependency resolution
  • Code splitting
  • Hot reloading
  • Easy to extend

Dependency resolution

Easily install third-party dependencies:

$ npm install --save-dev jquery
require('./main.css');
var $ = require('jquery');
//...

Dependency resolution

Easily install third-party dependencies:

  • No need to copy assets to public folder
  • Bundled with your javascript
  • Even better minification
  • Does not pollute the global namespace

Code splitting

Generate multiple javascript assets for specific purposes

  • Light weight bundle for login page
  • Admin pages bundle
  • Vendor assets bundle

Easy to extend

  • CoffeeScript, ES6, JSX
  • SASS, Less, STYL
  • Markdown, asciidoc

Hot Reloading

DEMO