From 923b26df5b5782175ab3648fc55a9bc7a8f81b45 Mon Sep 17 00:00:00 2001 From: Jake Deichert Date: Thu, 27 Feb 2020 23:29:28 -0500 Subject: [PATCH] Don't check external imports for snowpack --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index b6e708f..ca2ce76 100644 --- a/src/index.ts +++ b/src/index.ts @@ -223,8 +223,10 @@ async function checkForNewWebModules( const importPath = transformedSource.substring(meta.s, meta.e); const notRelative = !importPath.startsWith('.'); const notAbsolute = !importPath.startsWith('/'); + const notHttp = !importPath.startsWith('http://'); + const notHttps = !importPath.startsWith('https://'); // Must be a node_module that snowpack didn't see before - return notRelative && notAbsolute; + return notRelative && notAbsolute && notHttp && notHttps; }); return foundMissingWebModule;