2
0

bundle.js 693 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * React Starter Kit (https://www.reactstarterkit.com/)
  3. *
  4. * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
  5. *
  6. * This source code is licensed under the MIT license found in the
  7. * LICENSE.txt file in the root directory of this source tree.
  8. */
  9. import webpack from 'webpack';
  10. import webpackConfig from './webpack.config';
  11. /**
  12. * Creates application bundles from the source files.
  13. */
  14. function bundle() {
  15. return new Promise((resolve, reject) => {
  16. webpack(webpackConfig).run((err, stats) => {
  17. if (err) {
  18. return reject(err);
  19. }
  20. console.log(stats.toString(webpackConfig[0].stats));
  21. return resolve();
  22. });
  23. });
  24. }
  25. export default bundle;