-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvite.config.ts
59 lines (57 loc) · 1.27 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
51
52
53
54
55
56
57
58
59
import { defineConfig } from "vite"
import react from "@vitejs/plugin-react"
import { ManifestV3Export, crx } from "@crxjs/vite-plugin"
import tailwindcss from '@tailwindcss/vite'
import path from "path"
const manifest: ManifestV3Export = {
manifest_version: 3,
name: "Kaspian",
version: "0.0.0.5",
icons: {
512: "public/favicon.png"
},
action: {
default_popup: "index.html"
},
background: {
service_worker: "src/wallet/index.ts",
type: "module"
},
content_scripts: [{
matches: [ "<all_urls>" ],
js: [ "src/provider" ],
run_at: "document_start"
}],
permissions: [ "storage" ],
// this is an ID for firefox, but the `ManifestV3Export` type doesn't have it
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
browser_specific_settings: {
gecko: {
id: "[email protected]"
}
},
content_security_policy: {
extension_pages: "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'"
}
}
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
tailwindcss(),
crx({ manifest })
],
resolve: {
alias: {
"@": path.resolve(__dirname, "src")
}
},
server: {
strictPort: true,
hmr: {
clientPort: 3000,
},
port: 3000
}
})