-
Notifications
You must be signed in to change notification settings - Fork 5
/
vite.config.ts
41 lines (39 loc) · 1.05 KB
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { defineConfig } from 'vite';
import monkey from 'vite-plugin-monkey';
import pkg from './package.json';
const name = pkg.name.split('/').at(-1)!;
export default defineConfig(({ command }) => {
return {
plugins: [
monkey({
entry: 'src/main.ts',
userscript: {
icon: 'https://vitejs.dev/logo.svg',
namespace: 'https://github.com/lisonge',
homepageURL: `https://github.com/gkd-kit/network-extension`,
author: `lisonge`,
name: {
'': name,
'zh-CN': `网络扩展`,
},
description: {
'': `Inject GM_XHR to Website`,
'zh-CN': `注入GM_XHR到网站`,
},
match:
command == 'serve'
? [`https://github.com/*`, `https://songe.li/*`]
: [`http://*/*`, `https://*/*`],
noframes: true,
connect: `*`,
},
server: {
prefix: false,
},
build: {
fileName: name + '.user.js',
},
}),
],
};
});