• 关于文档
  • 1. 概览
  • 2. 开始
    • 2.1. 动机
    • 2.2. webpack是什么
    • 2.3. 安装
    • 2.4. 用法
    • 2.5. Require Modules
    • 2.6. Vendor Modules
    • 2.7. 使用 Loaders
    • 2.8. 使用 Plugins
    • 2.9. 工具
    • 2.10. 故障处理
  • 3. 教程与例子
    • 3.1. 开始
    • 3.2. 教程列表
    • 3.3. 示例
  • 4. 指南
    • 4.1. CommonJs
    • 4.2. AMD
    • 4.3. 对于browserify用户
    • 4.4. 代码拆分
    • 4.5. Stylesheets
    • 4.6. 性能优化
    • 4.7. 长期缓存
    • 4.8. 如何编写loader
    • 4.9. 如何编写插件
    • 4.10. 多入口点
    • 4.11. 库和扩展
    • 4.12. Shimming modules
    • 4.13. 测试
    • 4.14. 构建性能
    • 4.15. 热替换
    • 4.16. Comparison
  • 5. webpack with
    • 5.1. grunt | Usage with grunt
    • 5.2. gulp | 使用gulp
    • 5.3. bower | Usage with bower
    • 5.4. karma | Usage with karma
  • 6. Lists
    • 6.1. loader conventions
    • 6.2. List of loaders
    • 6.3. List of plugins
    • 6.4. List of hints
    • 6.5. 配置
    • 6.6. CLI
    • 6.7. Node.js API
    • 6.8. API in modules
    • 6.9. Loaders
    • 6.10. Plugins
    • 6.11. Context
    • 6.12. Resolving
    • 6.13. Hot Module Replacement
    • 6.14. Dev Tools
      • 6.14.1. webpack-dev-server
      • 6.14.2. webpack-dev-middleware
  • 7. Development
    • 7.1. Changelog
    • 7.2. Roadmap
    • 7.3. Ideas
    • 7.4. Contributing
  • Published with GitBook

webpack doc

simple examples

Basic usage

  • CommonJs

Code Splitting

  • Code Splitting
  • Code Splitting with the bundle-loader

multiple entry points

  • multiple entry points

module styles

  • labeled modules
  • CommonJs, AMD and labeled modules mixed
  • Component modules

library and externals

  • library option with multiple entry points and UMD
  • using stuff from other scripts

loaders

  • using loaders
  • using coffee-script

context

  • dynamic require
  • dynamic require with a single chunk
  • dynamic require with a single chunk (AMD)
  • TODO: dynamic require with a chunk per module

i18n

  • using the i18n plugin

advanced examples

advanced CommonJs

  • require.resolve

advanced Code Splitting

  • aggressive merging of chunks
  • moving modules between chunks
  • routing with multiple entry points and Code Splitting

multi compiler

  • using multiple configurations

deduplication

  • using the deduplication plugin
  • deduplication with Code Splitting

commons chunk plugin

  • using the a commons chunk

stylesheet

  • extracting a stylesheet for the css modules
  • + Code Splitting
  • + commons chunk

WebWorker

  • using the webworker-loader

named chunks

  • merging chunks with naming