ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

commit 00346331a7152d561febfe5a64638f55e41d39c6
parent 314a7bb5172c284bfa345c1cd9262a4588923a1d
Author: Zane Hitchcox <zwhitchcox@gmail.com>
Date:   Tue,  5 Apr 2016 23:40:30 -0500

clean config.entry

This accomplishes the same thing, with fewer lines of code
Diffstat:
Mtools/start.js | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/tools/start.js b/tools/start.js @@ -31,12 +31,7 @@ async function start() { // to enable Hot Module Replacement (HMR) and React Transform webpackConfig.filter(x => x.target !== 'node').forEach(config => { /* eslint-disable no-param-reassign */ - if (Array.isArray(config.entry)) { - config.entry.unshift('webpack-hot-middleware/client'); - } else { - config.entry = ['webpack-hot-middleware/client', config.entry]; - } - + config.entry = ['webpack-hot-middleware/client'].concat(config.entry); config.output.filename = config.output.filename.replace('[chunkhash]', '[hash]'); config.output.chunkFilename = config.output.chunkFilename.replace('[chunkhash]', '[hash]'); config.plugins.push(new webpack.HotModuleReplacementPlugin());