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

Webpack

Cesar
November 07, 2015

 Webpack

Cesar

November 07, 2015
Tweet

More Decks by Cesar

Other Decks in Programming

Transcript

  1. W E B PA C K PA C K Y

    O U R W E B
  2. <script src=“jquery.min.js></script> <script src=“angular.min.js”</script> <script src=“bootstrap.min.js”</script> <script src=“slick.min.js”</script> <script src=“angular-slick.js”</script>

    <script src=“…”</script> <script src=“…”</script> <script src=“…”</script> <script src=“…”</script> <script src=“…”</script> <script src=“app.js”></script>
  3. http://webpack.github.io/ W E B PA C K H A S

    • Code Splitting • Loaders • Plugins • Hot Module Replacement
  4. W E B PA C K D E V S

    E R V E R # node module for project $ npm install —-save webpack-dev-server # add to the entries of webpack config webpack-dev-server/client?http://0.0.0.0:8000 webpack/hot/only-dev-server
  5. W E B PA C K D E V S

    E R V E R Just a little express server uses the webpack-dev-middleware.
  6. H O T M O D U L E R

    E P L A C E M E N T http://webpack.github.io/example-app/ http://webpack.github.io/docs/hot-module-replacement.html
  7. H O W T O U S E # CLI

    tool $ npm install —-global webpack $ webpack # node module for project $ npm install —-save webpack