From 4f8eb55474d69354f65d7f493b39108f6d35b441 Mon Sep 17 00:00:00 2001 From: Michal Piechowiak Date: Tue, 12 Jun 2018 22:23:15 +0200 Subject: [PATCH] fix(pack): higher priority to .npmignore over .gitignore on windows --- src/util/filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/filter.js b/src/util/filter.js index 2fddcee5a1..0ca4744877 100644 --- a/src/util/filter.js +++ b/src/util/filter.js @@ -160,7 +160,7 @@ export function filterOverridenGitignores(files: WalkFiles): WalkFiles { } else { //don't include .gitignore if .npmignore or .yarnignore are present const dir = path.dirname(file.absolute); - const higherPriorityIgnoreFilePaths = [`${dir}/${IGNORE_FILENAMES[0]}`, `${dir}/${IGNORE_FILENAMES[1]}`]; + const higherPriorityIgnoreFilePaths = [path.join(dir, IGNORE_FILENAMES[0]), path.join(dir, IGNORE_FILENAMES[1])]; const hasHigherPriorityFiles = files.find(file => higherPriorityIgnoreFilePaths.indexOf(file.absolute) > -1); if (!hasHigherPriorityFiles) { return [...acc, file];