Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-es6-webpack-example

Sample setup with Gulp, Babel, Mocha and Webpack over ES6, transpiled to ES5 (source maps included).

All the code, Mocha tests and config files from Gulp and Webpack are ES6.

The is a preload bundle (to be loaded during page load time) and also a separate bundle (to be lazy loaded after the user presses a button).

The lazy-loadable bundles are automatically generated by webpack and the code is just requiring things internally using ES6/CommonJS, making it possible to avoid AMD/RequireJS for asynchronous loading.

Running gulp will:

  1. Transpile ES6 code with Babel
  2. Run Mocha unit tests
  3. Package bundles with Webpack (dedupe + uglify)

See it live: run gulp server and open http://localhost:8080/public/. Verify you have downloaded just the preload JS bundle file. Now hit the button, it will download an additional bundle file, related with that button.

About

Sample setup with Gulp, Babel, Mocha and Webpack, including lazy loading

Resources

Stars

101 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages