Skip to content

Commit 2d4c078

Browse files
committed
fix: remove public from filePath if it's there
1 parent 820c240 commit 2d4c078

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ function toArrayBuffer(buf) {
2525

2626
export default function (file, output, options) {
2727
function getFilePath(file) {
28+
// remove public from path. assuming that public is the assets root
29+
if (file.includes("public")) {
30+
file = file.replace("public", "");
31+
}
2832
return `${options.root ?? "/"}${options.root ? path.basename(file) : path.normalize(file)}`;
2933
}
3034

0 commit comments

Comments
 (0)