-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathmanifest.ts
54 lines (51 loc) · 1.47 KB
/
manifest.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
import { defineManifest } from '@crxjs/vite-plugin';
import { version } from '../package.json';
// NOTE: do not include src/ in paths,
// vite root folder: src, public folder: public (based on the project root)
// @see ../vite.config.ts#L16
const manifest = defineManifest(async (env) => ({
manifest_version: 3,
name: `${env.mode === 'development' ? '[Dev] ' : ''}Browser Extension TypeScript & React Starter`,
description: 'Browser Extension, TypeScript, React',
version,
background: {
service_worker: 'background/index.ts',
},
content_scripts: [
{
matches: ['http://*/*', 'https://*/*', 'file:///*'],
js: ['content/index.tsx'],
},
],
host_permissions: ['<all_urls>'],
options_ui: {
page: 'options/options.html',
open_in_tab: true,
},
web_accessible_resources: [
{
resources: [
// this file is web accessible; it supports HMR b/c it's declared in `rollupOptions.input`
'welcome/welcome.html',
],
matches: ['<all_urls>'],
},
],
action: {
default_popup: 'popup/popup.html',
default_icon: {
'16': 'images/extension_16.png',
'32': 'images/extension_32.png',
'48': 'images/extension_48.png',
'128': 'images/extension_128.png',
},
},
icons: {
'16': 'images/extension_16.png',
'32': 'images/extension_32.png',
'48': 'images/extension_48.png',
'128': 'images/extension_128.png',
},
permissions: ['storage', 'tabs'],
}));
export default manifest;