-
Notifications
You must be signed in to change notification settings - Fork 7
/
vite.config.ts
67 lines (66 loc) · 2.77 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import monkey, { cdn } from 'vite-plugin-monkey'
// https://vitejs.dev/config/
export default defineConfig({
// https://github.com/sass/dart-sass/issues/2352
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
},
},
},
plugins: [
vue(),
monkey({
entry: 'src/main.ts',
userscript: {
name: 'bilibili 页面净化大师',
namespace: 'http://tampermonkey.net/',
version: '4.0.12',
description:
'净化 B站/哔哩哔哩 页面,支持「精简功能、播放器净化、过滤视频、过滤评论、全站黑白名单」,提供 300+ 功能,定制自己的 B 站',
author: 'festoney8',
homepage: 'https://github.com/festoney8/bilibili-cleaner',
supportURL: 'https://github.com/festoney8/bilibili-cleaner',
license: 'MIT',
match: ['*://*.bilibili.com/*'],
exclude: [
'*://message.bilibili.com/pages/nav/header_sync',
'*://message.bilibili.com/pages/nav/index_new_pc_sync',
'*://data.bilibili.com/*',
'*://cm.bilibili.com/*',
'*://link.bilibili.com/*',
'*://passport.bilibili.com/*',
'*://api.bilibili.com/*',
'*://api.*.bilibili.com/*',
'*://*.chat.bilibili.com/*',
'*://member.bilibili.com/*',
'*://www.bilibili.com/correspond/*',
'*://live.bilibili.com/p/html/*',
'*://live.bilibili.com/live-room-play-game-together',
'*://www.bilibili.com/blackboard/comment-detail.html*',
'*://www.bilibili.com/blackboard/newplayer.html*',
],
icon: 'https://www.bilibili.com/favicon.ico',
'run-at': 'document-start',
downloadURL:
'https://update.greasyfork.org/scripts/479861/bilibili%20%E9%A1%B5%E9%9D%A2%E5%87%80%E5%8C%96%E5%A4%A7%E5%B8%88.user.js',
updateURL:
'https://update.greasyfork.org/scripts/479861/bilibili%20%E9%A1%B5%E9%9D%A2%E5%87%80%E5%8C%96%E5%A4%A7%E5%B8%88.meta.js',
},
build: {
externalGlobals: {
vue: cdn.npmmirror('Vue', 'dist/vue.global.prod.js'),
},
},
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
})