Skip to content

Commit

Permalink
refactor: avoid lodash.tail
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Aug 8, 2019
1 parent e279f2a commit 74f6832
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
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
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

0 comments on commit 74f6832

Please sign in to comment.