Skip to content

Instantly share code, notes, and snippets.

@jakwuh
Created August 5, 2016 01:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakwuh/4762f21cd86cd003e10f70d6f4d9b9cd to your computer and use it in GitHub Desktop.
Save jakwuh/4762f21cd86cd003e10f70d6f4d9b9cd to your computer and use it in GitHub Desktop.
Webpack bundle generator functions
import Header from './components/header';
import TeamCity from 'promise!./services/teamcity';
Promise.all([TeamCity]).then(function(TeamCity) {
// module code
});
import Header from './components/header';
import TeamCity from 'promise!./services/teamcity';
// module code
co(function* () {
var Header = require('./components/header');
var TeamCity = yield require('promise!./services/teamcity'); // promise! loader was detected then add yield
// module code
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment