-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
42 lines (40 loc) · 1.11 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
import { crx, defineManifest } from '@crxjs/vite-plugin';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
const manifest = defineManifest({
manifest_version: 3,
name: 'らくらく再出品',
version: '1.5',
icons: {
'16': 'public/icons/16.png',
'32': 'public/icons/32.png',
'48': 'public/icons/48.png',
'128': 'public/icons/128.png',
},
action: {},
content_scripts: [
{
matches: ['https://jp.mercari.com/*'],
js: ['src/ContentScripts/content_script.ts'],
},
{
matches: ['https://jp.mercari.com/item/*'],
js: ['src/ContentScripts/SoldPage/sold_page_script.ts'],
},
{
matches: ['https://jp.mercari.com/sell/create'],
js: ['src/ContentScripts/CreatePage/create_page_script.ts'],
},
],
background: {
service_worker: 'src/Background/background.ts',
},
permissions: ['scripting', 'storage', 'webRequest', 'tabs'],
host_permissions: [
'https://jp.mercari.com/transaction/*',
'https://api.mercari.jp/items/get?id=*',
],
});
export default defineConfig({
plugins: [react(), crx({ manifest })],
});