Please enable JavaScript.
Coggle requires JavaScript to display documents.
webpack 指南 (Core concepts (output (Code splitting (防止重复 (CommonsChunkPlugi…
webpack 指南
Core concepts
-
-
plugins
- more powerful than loader
Output Management
HtmlWebpackPlugin
- Add bundles.
- Replace variables
- Generate new index.html
-
shimming
- provide package as global
- 浏览器polyfill
-
工具
inline-source-map:
代码报错指向源代码的行 file xx , line xx
发生修改时自动编译
- webpack-dev-server
- watch
- 其它
-
特殊支持
- import/export支持:转译
- ES2015支持:需要通过 babel-loader 实现转译
- PWA支持
config
- npx webpack--param
- npx webpack --config webpack.config.js
- npm scripts
-
A JS Static Module bundler
- Bundle dynamically by dependency graph
- Bundle static moduls
- Not a task runner(e.g. Grunt, Gulp, npm scripts)