-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
50 lines (49 loc) · 1.23 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
import { resolve } from 'node:path'
import process from 'node:process'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { crx, defineManifest } from '@crxjs/vite-plugin'
import icons from 'unplugin-icons/vite'
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js'
const version = process.env.npm_package_version || '0.0.0'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
cssInjectedByJsPlugin({ styleId: 'sync-vide-rtc-styles' }),
icons({
autoInstall: true,
}),
crx({
manifest: defineManifest(async () => ({
name: 'synco',
version,
description: 'synco',
manifest_version: 3,
icons: {
16: 'icons/16.png',
48: 'icons/48.png',
128: 'icons/128.png',
},
background: {
service_worker: 'src/app/browser/Worker.ts',
type: 'module',
},
content_scripts: [
{
matches: ['*://*/*'],
js: ['src/app/menu/Main.ts'],
},
],
action: {
default_title: 'synco',
},
})),
}),
],
resolve: {
alias: {
'@': resolve(__dirname, 'src/'),
},
},
})