Skip to content

Commit ca9a656

Browse files
toastalethul
authored andcommitted
.filter(λ).length → .some(λ)
1 parent 392fce5 commit ca9a656

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ const path = require('path');
44

55
const webpack = require('webpack');
66

7-
const isWebpackDevServer = process.argv.filter(a => path.basename(a) === 'webpack-dev-server').length;
7+
const isWebpackDevServer = process.argv.some(a => path.basename(a) === 'webpack-dev-server');
88

9-
const isWatch = process.argv.filter(a => a === '--watch').length
9+
const isWatch = process.argv.some(a => a === '--watch');
1010

1111
const plugins =
1212
isWebpackDevServer || !isWatch ? [] : [

0 commit comments

Comments
 (0)