We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 598081f commit 5cc4a2aCopy full SHA for 5cc4a2a
loader.js
@@ -50,9 +50,13 @@ const parseModule = async (specifier, modulePathToFetch) => {
50
extractPackageNameAndVersion
51
);
52
console.log(packageName);
53
-
54
const cachePath = join(cache, packageName, filePath);
55
cacheMap.set(`file://${cachePath}`, modulePathToFetch);
+
56
+ if (existsSync(cachePath)) {
57
+ return cachePath
58
+ }
59
60
const code = await (await fetch(modulePathToFetch)).text();
61
ensureFileSync(cachePath);
62
writeFileSync(cachePath, code);
0 commit comments