Skip to content

Commit

Permalink
refactor: avoid using lodash (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored and michael-ciniawsky committed Jan 17, 2018
1 parent 7c8a403 commit f6c1ba7
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 73 deletions.
145 changes: 88 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"serialize-javascript": "^1.4.0",
"is-glob": "^4.0.0",
"loader-utils": "^0.2.15",
"lodash": "^4.3.0",
"minimatch": "^3.0.4",
"pify": "^3.0.0",
"p-limit": "^1.0.0"
Expand Down
5 changes: 2 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import path from 'path';
import _ from 'lodash';
import preProcessPattern from './preProcessPattern';
import processPattern from './processPattern';

Expand Down Expand Up @@ -116,7 +115,7 @@ function CopyWebpackPlugin(patterns = [], options = {}) {
const compilationContextDependencies = new Set(compilation.contextDependencies);

// Add file dependencies if they're not already tracked
_.forEach(fileDependencies, (file) => {
fileDependencies.forEach((file) => {
if (compilationFileDependencies.has(file)) {
debug(`not adding ${file} to change tracking, because it's already tracked`);
} else {
Expand All @@ -126,7 +125,7 @@ function CopyWebpackPlugin(patterns = [], options = {}) {
});

// Add context dependencies if they're not already tracked
_.forEach(contextDependencies, (context) => {
contextDependencies.forEach((context) => {
if (compilationContextDependencies.has(context)) {
debug(`not adding ${context} to change tracking, because it's already tracked`);
} else {
Expand Down

0 comments on commit f6c1ba7

Please sign in to comment.