fix: add trailing slash to user components glob

This commit is contained in:
Fran Dios 2021-11-10 14:05:52 +09:00
parent 609a697d6c
commit b021d8558e

View file

@ -79,9 +79,12 @@ export default () => {
const importerToRootPath = path.relative(importerPath, config.root);
const [importerToRootNested] =
importerToRootPath.match(/(\.\.\/)+/) || [];
importerToRootPath.match(/(\.\.\/)+(\.\.)?/) || [];
const userPrefix = path.normalize(
path.join(importerPath, importerToRootNested)
path.join(
importerPath,
importerToRootNested.replace(/\/?$/, path.sep)
)
);
const userGlob = path.join(
importerToRootPath,