1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| module.exports = {
| main: 'index.js',
| platform: ['uni-app'],
| handler (file, platform) {
| if (platform === 'uni-app') {
| // 添加 img-cache 属性
| if (file.path.includes('mp-html.vue')) {
| file.contents = Buffer.from(
| file.contents
| .toString()
| .replace(/props\s*:\s*{/, 'props: {\n ImgCache: Boolean,')
| )
| }
| }
| }
| }
|
|