-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwxt.config.ts
More file actions
63 lines (62 loc) · 1.66 KB
/
wxt.config.ts
File metadata and controls
63 lines (62 loc) · 1.66 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
61
62
63
import wasm from "vite-plugin-wasm";
import { defineConfig } from "wxt";
// See https://wxt.dev/api/config.html
export default defineConfig({
manifest: {
// TODO: review permissions, move to the optional permissions?
permissions: [
"scripting",
"tabs",
"declarativeNetRequest",
"declarativeNetRequestFeedback",
"browsingData",
"webNavigation",
"storage",
],
content_security_policy: {
extension_pages:
"script-src 'self' 'wasm-unsafe-eval'; object-src 'self' 'wasm-unsafe-eval'; worker-src 'self' 'wasm-unsafe-eval';",
},
},
webExt: {
chromiumArgs: [
"--user-data-dir=./.wxt/chrome-data",
"--auto-open-devtools-for-tabs",
"--hide-crash-restore-bubble",
"--enable-extension-activity-logging",
],
startUrls: [
"https://baloonza.com/",
// Doesn't work due to https://github.com/mozilla/web-ext/pull/2774
// "chrome://extensions",
// "chrome://inspect/#service-workers",
],
},
outDir: "dist",
modules: ["@wxt-dev/module-react"],
vite: () => ({
build: {
target: "esnext",
format: "es",
},
resolve: {
alias: [
{
find: "bson",
replacement: require.resolve("bson"),
},
],
},
optimizeDeps: {
// Don't optimize these packages as they contain web workers and WASM files.
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
exclude: ["@journeyapps/wa-sqlite", "@powersync/web"],
include: ["@powersync/web > js-logger"],
},
plugins: [wasm()],
worker: {
format: "es",
plugins: () => [wasm()],
},
}),
});