From b81ab35d45aa8f254126fbcddbc4fca381c680a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Ca=CC=81mara?= Date: Thu, 25 Jan 2018 10:28:53 +0100 Subject: [PATCH] * Moved `bodyParser` require to the top of the document --- webpack.config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index e24c8d1..808e6f6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,6 +4,7 @@ const webpack = require('webpack') const packageInfo = require('./package') +const bodyParser = require('webpack-body-parser') const chunkUpload = require('./src/utils/chunkUpload') process.env.NODE_ENV = process.env.NODE_ENV || 'production' @@ -187,8 +188,6 @@ module.exports = merge(baseConfig(), { res.json({ success: true }) } - const bodyParser = require('webpack-body-parser') - // Chunk upload app.post('/upload/chunk', bodyParser.json(), chunkUpload)