Example code for the talk on Webpack
JavaScript HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
README.md
karma.conf.js
package.json
test.index.js
webpack-common.config.js
webpack-dev.config.js
webpack-prod.config.js
webpack-slides.pdf
webpack-test.config.js

README.md

webpack-talk

Example code for the talk on Webpack.

Slides

Topics Covered

  • A simple project with webpack.config.js
  • Stamping builds with a hash in filename
  • JS/JSX transpilation via babel
  • Adding index.html via HtmlWebpackPlugin
  • Add CSS support
  • Loading images with file-loader
  • Aliasing module names for shorter imports
  • Code splitting with vendor entry + CommonsChunkPlugin
  • Using DefinePlugin to introduce env vars
  • Using ProvidePlugin for supplying modules for free vars
  • Lazy loading components
  • historyApiFallback with react-router-dom
  • React HMR with react-hot-loader
  • Dev and Prod configurations using webpack-merge
  • Adding Unit testing with Karma/Mocha/Chai/Sinon