Skip to content

Commit

Permalink
Merge pull request #536 from yingzhe/master
Browse files Browse the repository at this point in the history
fix: sass parser not working with monorepo setup
  • Loading branch information
rumpl committed May 14, 2020
2 parents 26e6663 + 1ece6f5 commit 8228da2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/parser/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ export default async function parseSASS(filename, deps, rootDir) {

const result = lodash(stats.includedFiles)
.map((file) => path.relative(rootDir, file))
.filter((file) => file.indexOf('node_modules') === 0) // refer to node_modules
.filter((file) => file.indexOf('node_modules') >= 0) // refer to node_modules
.map((file) => file.replace(/\\/g, '/')) // normalize paths in Windows
.map((file) => file.substring('node_modules/'.length)) // avoid heading slash
.map((file) =>
file.substring(file.indexOf('node_modules/') + 'node_modules/'.length),
) // avoid heading slash
.map(requirePackageName)
.uniq()
.value();
Expand Down

0 comments on commit 8228da2

Please sign in to comment.