Skip to content

Commit

Permalink
Merge pull request #48 from petetnt/patch-2
Browse files Browse the repository at this point in the history
Clean up build.js
  • Loading branch information
jaredpalmer committed Nov 10, 2020
2 parents 6ffd461 + ee91a08 commit da95368
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/build.js
Expand Up @@ -12,16 +12,14 @@ process.on('unhandledRejection', err => {
const webpack = require('webpack');
const config = require('./webpack.config');

const clientCompiler = webpack(config);

console.log('[0/1] Creating an optimized production build...');
compile(config, (err, stats) => {
compile((err, stats) => {
handleWebpackErrors(err, stats);
console.log('[1/1] Build successful!');
});

// Wrap webpack compile in a try catch.
function compile(config, cb) {
function compile(cb) {
let compiler;
try {
compiler = webpack(config);
Expand Down

0 comments on commit da95368

Please sign in to comment.