From b52b0dff0066149f798cfb39709f604d52beef79 Mon Sep 17 00:00:00 2001 From: Louis Pineau <47593132+pineaulo@users.noreply.github.com> Date: Wed, 9 Sep 2020 19:01:25 +0200 Subject: [PATCH] Fixed circular dependency when importing "./*" --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 30a746b..d8bcca9 100644 --- a/index.js +++ b/index.js @@ -54,7 +54,8 @@ module.exports = function ({types: t}) { pattern = pattern.replace(/\\/g, '/'); } - let files = glob.sync(pattern, {strict: true, nodir: true}); + let files = glob.sync(pattern, {strict: true, nodir: true}) + .filter(file => file !== state.file.opts.filename); // Capture matches let re = micromatch.makeRe(pattern, {capture: true});