Skip to content

Commit

Permalink
feat: spread to object.assign
Browse files Browse the repository at this point in the history
  • Loading branch information
smelukov committed Mar 18, 2020
1 parent ab9b447 commit 9f28cd8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/utils/addEntries.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ function addEntries(config, options, server) {
// entry[key] should be a string here
const entryDescription = originalEntry[key];
if (typeof entryDescription === 'object' && entryDescription.import) {
clone[key] = {
...entryDescription,
clone[key] = Object.assign({}, entryDescription, {
import: prependEntry(entryDescription.import, additionalEntries),
};
});
} else {
clone[key] = prependEntry(entryDescription, additionalEntries);
}
Expand Down

0 comments on commit 9f28cd8

Please sign in to comment.