欢迎使用WEBPACK文档!

英文版

如果你是webpack新手, 你可以阅读入门教程.

插件

webpack有丰富的插件接口. Most of the features are internal plugins using this interface. This makes webpack very flexible.

性能

webpack uses async I/O and has multiple caching levels. This makes webpack fast and incredibly fast on incremental compilation.

加载器

webpack supports pre-processing files via loaders. This allows you to bundle any static resource not only javascript. You can easily write your own loaders running in node.js.

支持

webpack supports AMD and CommonJs module styles. It performs clever static analysis on the AST of your code. It even has an evaluation engine to evaluate simple expressions. This allows you to support most existing libraries.

代码分割

webpack allows to split your codebase into chunks. Chunks are loaded on demand. This reduces initial loading time.

优化

webpack can do many optimizations to reduce the output size. It also cares about request caching by using hashes.

开发工具

webpack supports SourceUrls and SourceMaps for simple debugging. It can watch your files and comes with a development middleware and a development server for automatic reloading.

多个目标

webpack's main target is the web, but it also supports generating bundles for WebWorkers and node.js.

目录

  • 入门
    • Motivation
    • What is webpack?
    • Installation
    • Usage
    • Require Modules
    • Vendor Modules
    • Using Loaders
    • Using Plugins
    • Dev Tools
    • Troubleshooting
  • 文档和示例
    • Getting started
    • List of tutorials
    • examples
  • 引导
    • CommonJs
    • AMD
    • webpack for browserify users
    • Code Splitting
    • Stylesheets
    • Optimization
    • Long-term Caching
    • How to write a loader
    • How to write a plugin
    • Multiple entry points
    • Library and externals
    • Shimming modules
    • Testing
    • Build performance
    • Hot Module Replacement with webpack
    • Comparison
  • 集成
    • grunt
    • gulp
    • bower
    • karma
  • 列表
    • loader conventions
    • List of loaders
    • List of plugins
    • List of tutorials
    • List of hints
  • API
    • Configuration
    • CLI
    • Node.js API
    • API in modules
    • Loaders
    • Plugins
    • Context
    • Resolving
    • Hot Module Replacement
    • Dev Tools
      • webpack-dev-server
      • webpack-dev-middleware
  • 开发
    • Changelog
    • Roadmap
    • Ideas
    • Contributing