chenyao
2025-12-01 08fcc710d0a2acb185b3477d72fe32aff6f2e29a
1
2
3
4
5
6
7
8
9
10
11
12
13
/**
 * @name ReplaceImageUrl
 * @description 替换图片地址
 */
import replaceImageUrl from 'vite-plugin-replace-image-url'
 
export const ReplaceUrlPlugin = () => {
  return replaceImageUrl({
    publicPath: 'https://photo.example.com/miniprogram',
    sourceDir: 'src/static',
    verbose: true,
  })
}