From 30ba0f5d55b173847a7468096efb5dafd271a94d Mon Sep 17 00:00:00 2001 From: Michael Hancock Date: Wed, 6 Mar 2019 09:18:20 +0000 Subject: [PATCH] Fix: Resolve path of component files (#1305) Closes #1246 --- src/loaders/utils/getComponentFiles.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/loaders/utils/getComponentFiles.js b/src/loaders/utils/getComponentFiles.js index a54145afa..d15dbca3d 100644 --- a/src/loaders/utils/getComponentFiles.js +++ b/src/loaders/utils/getComponentFiles.js @@ -1,4 +1,5 @@ const glob = require('glob'); +const path = require('path'); const isFunction = require('lodash/isFunction'); const isString = require('lodash/isString'); @@ -46,6 +47,9 @@ module.exports = function getComponentFiles(components, rootDir, ignore) { // Resolve list of components from globs const componentFiles = getFilesMatchingGlobs(componentGlobs, rootDir, ignore); + + // Get absolute component file paths with correct slash separator format + const resolvedComponentFiles = componentFiles.map(file => path.resolve(file)); - return componentFiles; + return resolvedComponentFiles; };