Skip to content

Commit

Permalink
refactor: avoid lodash.tail (#707)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored Aug 8, 2019
1 parent e279f2a commit 9e5a45d
Show file tree
Hide file tree
Showing 4 changed files with 1,932 additions and 1,232 deletions.
1 change: 1 addition & 0 deletions lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function sassLoader(content) {
);

if (stdinIndex !== -1) {
// eslint-disable-next-line no-param-reassign
result.map.sources[stdinIndex] = path.relative(
process.cwd(),
resourcePath
Expand Down
8 changes: 5 additions & 3 deletions lib/webpackImporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

const path = require('path');

const tail = require('lodash.tail');

const importsToResolve = require('./importsToResolve');

const matchCss = /\.css$/;
Expand Down Expand Up @@ -57,7 +55,11 @@ function webpackImporter(resourcePath, resolve, addNormalizedDependency) {
file: resolvedFile.replace(matchCss, ''),
};
},
() => startResolving(dir, tail(importsToResolve))
() => {
const [, ...tailResult] = importsToResolve;

return startResolving(dir, tailResult);
}
);
}

Expand Down
Loading

0 comments on commit 9e5a45d

Please sign in to comment.