Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Webpack

Yu Xin
October 18, 2016

 Webpack

Webpack introduce.

Yu Xin

October 18, 2016
Tweet

More Decks by Yu Xin

Other Decks in Programming

Transcript

  1. 迷茫 • JS模块化. module定义 AMD, CMD, ... • 包管理工具 NPM,

    Bower, Browserify ... • 构建工具 grunt, gulp, ...
  2. gulp + bower • bower作为包管理器 • 支持browersync的开发服务器 • gulp pipeline负责构建过程

    • wiredep负责打包以及js/css注入 • 通过插件支持angularjs template打包
  3. 安装依赖 npm install -g webpack webpack-dev-server …… npm install --save

    react npm install --save react-redux npm install --save redux ……
  4. 更多功能 • webpack-dev-server • source-map • react-hot-reload • more and

    more http://webpack.github.io/docs/ • angular-template-loader https://github.com/WearyMonkey/ngtemplate-loader https://github.com/teux/ng-cache-loader