codewithkyle / asset-manager

A simple build tool for managing your Service Worker resource caches.
https://www.npmjs.com/package/@codewithkyle/asset-manager
MIT License
0 stars 0 forks source link

Top level assets bug #2

Closed codewithkyle closed 3 years ago

codewithkyle commented 3 years ago

Asset manager always injects a second / when caching top level assets.

const pubDir = config.src[i].publicDir.replace(/^\/|\/$/g, "").trim();
const file = newFiles[j].replace(/.*[\/\\]/, "").trim();
publicFiles.push(`${pubDir.length ? `/${pubDir}` : ""}/${file}`);