Skip to content

Commit 3f3065b

Browse files
fix: remove public prefix to resolve vite assets warning (#117)
Co-authored-by: Arlo <webfansplz@gmail.com>
1 parent 1b3ec39 commit 3f3065b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/core/src/vite-rpc/assets.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ export function setupAssetsRPC(config: SetupAssetsOptions) {
8383
cache = await Promise.all(files.map(async (path) => {
8484
const filePath = resolve(dir, path)
8585
const stat = await fsp.lstat(filePath)
86+
// remove public prefix to resolve vite assets warning
87+
path = path.startsWith('public/') ? path.slice(7) : path
8688
return {
8789
path,
8890
publicPath: join(baseURL, path),

0 commit comments

Comments
 (0)