-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwxt.config.ts
70 lines (68 loc) · 2.09 KB
/
wxt.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
68
69
70
import {defineConfig} from 'wxt';
import react from '@vitejs/plugin-react';
import Unocss from "unocss/vite";
import tailwindcss from "tailwindcss";
import postcssPresetMantine from "postcss-preset-mantine";
import postcssSimpleVars from "postcss-simple-vars";
//import {replaceCodePlugin} from "vite-plugin-replace";
import pkg from "./package.json";
import replace from "vite-plugin-filter-replace";
// vite.config.js
// See https://wxt.dev/api/config.html
export default defineConfig({
dev: {
reloadCommand: 'Alt+T',
},
manifest: {
name: '__MSG_extName__',
description: '__MSG_extDescription__',
default_locale: 'en',
permissions: ['storage', "contextMenus", 'webRequest', "sidePanel"],
commands: {
'open-option': {
suggested_key: {
default: 'Ctrl+Shift+Y',
mac: 'Command+Shift+Y',
},
description: 'Open the option',
},
},
action: {
"default_title": "Click to open sidebar"
}
},
vite: () => ({
plugins: [
react(),
Unocss({}),
replace([
{
filter: /index\.html$/,
replace: [
{
from: /<%\s*VITE_APP_TITLE\s*\/>/,
to: pkg.name
}
]
}
]),
],
css: {
postcss: {
plugins: [
tailwindcss,
postcssPresetMantine,
postcssSimpleVars({
variables: {
'mantine-breakpoint-xs': '36em',
'mantine-breakpoint-sm': '48em',
'mantine-breakpoint-md': '62em',
'mantine-breakpoint-lg': '75em',
'mantine-breakpoint-xl': '88em',
},
}),
]
}
}
}),
});