first
This commit is contained in:
13
build/plugins/replaceUrl.ts
Normal file
13
build/plugins/replaceUrl.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @name ReplaceUrlPlugin
|
||||
* @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,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user