Skip to content

Commit

Permalink
refactor(addEntries): make use of includes (#2205)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 authored and hiroppy committed Aug 21, 2019
1 parent 86b1eb5 commit eab6acd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/utils/addEntries.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,14 @@ function addEntries(config, options, server) {
// eslint-disable-next-line no-shadow
[].concat(config).forEach((config) => {
/** @type {Boolean} */
const webTarget =
config.target === 'web' ||
config.target === 'webworker' ||
config.target === 'electron-renderer' ||
config.target === 'node-webkit' ||
config.target == null;
const webTarget = [
'web',
'webworker',
'electron-renderer',
'node-webkit',
undefined, // eslint-disable-line
null,
].includes(config.target);
/** @type {Entry} */
const additionalEntries = checkInject(
options.injectClient,
Expand Down

0 comments on commit eab6acd

Please sign in to comment.