From aecc11d1ae54a49f1f56c9f6558a2499e7dc4fac Mon Sep 17 00:00:00 2001 From: Georgiy Bukharov Date: Thu, 26 Aug 2021 15:16:39 +0400 Subject: [PATCH] feat: vite compatibility build with vite unobviously adds ?commonjs-require suffix to files --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 4692ee3..8b47203 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,7 @@ function ignore(list, options = {}) { return importee === emptyFileName || list.includes(importee) || (options.commonjsBugFix && - list.includes(importee.replace(/^\0/, "").replace(/\?commonjs-proxy$/, ""))) + list.includes(importee.replace(/^\0/, "").replace(/\?(commonjs-proxy|commonjs-require)$/, ""))) ? emptyFileName : null },