webpack进阶

熟悉webpack的所有特性,并清楚基本的配置。

github里有太多可以利用的东西了:

需要关心的地方:

  • Entry file
  • Multiple entry files
  • Babel-loader
  • CSS-loader
  • Image loader
  • CSS Module
  • UglifyJs Plugin
  • HTML Webpack Plugin and Open Browser Webpack Plugin
  • Environment flags
  • Code splitting
  • Code splitting with bundle-loader
  • Common chunk
  • Vendor chunk
  • Exposing Global Variables
  • Hot Module Replacement
  • React router