webpack-auto-inject-version/tools/compile.js

18 lines
373 B
JavaScript
Raw Normal View History

2017-04-11 06:33:32 +10:00
import gutil from 'gutil';
2018-03-15 22:07:22 +11:00
import webpack from 'webpack';
2017-04-11 06:33:32 +10:00
import webpackConfig from './webpack.conf';
function run() {
console.log('compiling');
2018-03-15 22:07:22 +11:00
const compiler = webpack(webpackConfig);
2017-04-11 06:33:32 +10:00
compiler.run((err, stats) => {
gutil.log('[webpack:build]', stats.toString({
chunks: false, // Makes the build much quieter
2018-03-15 22:07:22 +11:00
colors: true,
2017-04-11 06:33:32 +10:00
}));
});
}
run();