Skip to content

Commit 11003a7

Browse files
authored
fixup!
1 parent ea106d1 commit 11003a7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/utils/getFilenameFromUrl.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,17 @@ function getFilenameFromUrl(context, url, extra = {}) {
117117
// `/complex/foo.js` => `foo.js`
118118
// and add outputPath
119119
// `foo.js` => `/home/user/my-project/dist/foo.js`
120-
filename = path.join(outputPath, pathname);
120+
filename = path.join(
121+
outputPath,
122+
pathname.slice(publicPathPathname.length),
123+
);
121124

122125
try {
123126
extra.stats = context.outputFileSystem.statSync(filename);
124127
} catch {
125128
continue;
126129
}
127-
130+
// console.log({stats: extra.stats});
128131
if (extra.stats.isFile()) {
129132
foundFilename = filename;
130133

0 commit comments

Comments
 (0)