/webpack-boilerplate

Simple app to demo webpack (outdated)

Primary LanguageJavaScript

Webpack Boilerplate

The aim of this repo is to demonstrate the basic concepts behind Webpack, decoupled from other libraries and ideas. It accompany's this article on The Z Index. At it's core, Webpack dynamically bundles modularized JavaScript. However, it also encourages the bundling, and modularizing, of any other assets necessary for a client or server based project.

The Application

To make things a little less bland, the source compiles to a basic clock. It should simple enough for easy disection, while still illustrating the main concepts of a Webpack based project.

Takeaways

Introduces users to these concepts:

  • Configuring a simple build process and dev server
  • Bundling JavaScript and other assets (fonts and CSS)
  • Transpiling JavaScript from ES6 to ES5 with Babel

Set Up

Make sure npm and node are installed. Clone this repo and cd into it. npm install to retrieve all dependencies specified in the package.json file. npm run dev-server to start a webpack-dev-server. npm run deploy to create a minified, "production-ready" version of the site.

Next Steps

Check out the variations of this repo to see more advanced configuration and tools.