No need for this complex resolve

This commit is contained in:
RMidhunSuresh 2022-07-29 16:45:25 +05:30
parent 8d766ac504
commit 708637e390
1 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,8 @@ async function generateIconSourceMap(icons, manifestLocation) {
const fs = require("fs").promises;
for (const icon of Object.values(icons)) {
const [location] = icon.split("?");
const resolvedLocation = path.resolve(__dirname, "../../", manifestLocation, location);
// resolve location against manifestLocation
const resolvedLocation = path.resolve(manifestLocation, location);
const iconData = fs.readFile(resolvedLocation);
promises.push(iconData);
const fileName = path.basename(resolvedLocation);