Skip to content

Commit

Permalink
fix: remove public prefix to resolve vite assets warning (#117)
Browse files Browse the repository at this point in the history

Co-authored-by: Arlo <[email protected]>
  • Loading branch information
alexzhang1030 and webfansplz authored Dec 30, 2023
1 parent 1b3ec39 commit 3f3065b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/vite-rpc/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export function setupAssetsRPC(config: SetupAssetsOptions) {
cache = await Promise.all(files.map(async (path) => {
const filePath = resolve(dir, path)
const stat = await fsp.lstat(filePath)
// remove public prefix to resolve vite assets warning
path = path.startsWith('public/') ? path.slice(7) : path
return {
path,
publicPath: join(baseURL, path),
Expand Down

0 comments on commit 3f3065b

Please sign in to comment.