From a1786c2b598d0ccc7751f34e921b623d41a2aeb2 Mon Sep 17 00:00:00 2001 From: Arnaud Jezequel Date: Wed, 13 Jul 2022 09:02:59 +0200 Subject: [PATCH] add Vite support Add vite-ignore in import module --- src/util/import.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/import.mjs b/src/util/import.mjs index 1f79c2e..ab2ee79 100644 --- a/src/util/import.mjs +++ b/src/util/import.mjs @@ -7,9 +7,9 @@ export default function(name, wrapper = pass) { try { return typeof require === 'function' ? Promise.resolve(wrapper(require(name))) - : import(/* webpackIgnore: true */ name).then(wrapper) + : import(/* webpackIgnore: true */ /* @vite-ignore */ name).then(wrapper) } catch(err) { console.warn(`Couldn't load ${name}`) } } -} \ No newline at end of file +}