-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.ts
More file actions
60 lines (58 loc) · 1.36 KB
/
Copy pathvite.config.ts
File metadata and controls
60 lines (58 loc) · 1.36 KB
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
/// <reference types="node" />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { crx, ManifestV3Export } from '@crxjs/vite-plugin';
import path from 'path';
const manifest = {
manifest_version: 3,
name: 'OpenOzone WorkLog',
version: '1.0.0',
description: 'A Chrome extension to log time spent on work.',
permissions: ['sidePanel'],
action: {
default_icon: {
'16': 'icons/icon-16.png',
'32': 'icons/icon-32.png',
'48': 'icons/icon-48.png',
'128': 'icons/icon-128.png',
},
},
side_panel: {
default_path: 'src/sidepanel/index.html',
},
options_page: 'src/options/index.html',
background: {
service_worker: 'src/background/index.ts',
type: 'module',
},
content_scripts: [
{
matches: ['<all_urls>'],
js: ['src/content/index.ts'],
},
],
icons: {
'16': 'icons/icon-16.png',
'32': 'icons/icon-32.png',
'48': 'icons/icon-48.png',
'128': 'icons/icon-128.png',
},
} as ManifestV3Export;
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), crx({ manifest })],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
build: {
rollupOptions: {
input: {
options: 'src/options/index.html',
sidepanel: 'src/sidepanel/index.html',
},
},
},
publicDir: 'public',
});