-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbundle.config.ts
94 lines (77 loc) · 2.07 KB
/
bundle.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import type { BundleConfig } from "@/cli/bundle/types";
export default {
outdir: process.env.OUTDIR ?? "dist",
entryPoints: [
"./v2/background.entry.ts",
"./v2/content.entry.tsx",
"./v2/debug-view-vault.entry.tsx",
"./v2/injected.entry.css",
"./v2/onboard.entry.tsx",
"./v2/pages.entry.tsx",
"./v2/popup.entry.tsx",
// @start V1_COMPAT
"./v1/content/globals.css",
// @end V1_COMPAT
],
templates: () => [
{
sourcePath: "v2/templates/manifest/manifest.v2.ejs",
outputPath: "manifest.json",
},
// TODO: (MANIFEST_V3)
// {
// sourcePath: "v2/templates/manifest/manifest.v3.ejs",
// outputPath: "manifest.json",
// },
// TODO: (MANIFEST_V3)
// {
// sourcePath: "v2/templates/background.entry.v3.ejs",
// outputPath: "background.entry.mv3.js",
// },
{
sourcePath: "v2/images",
outputPath: "images",
},
{
sourcePath: "v2/wasm/wsm_bg.wasm",
outputPath: "wsm_bg.wasm",
},
{
sourcePath: "v2/templates/html/debug-view-vault.ejs",
outputPath: "debug-view-vault.html",
},
{
sourcePath: "v2/templates/html/onboard.ejs",
outputPath: "onboard.html",
},
{
sourcePath: "v2/templates/html/pages.ejs",
outputPath: "pages.html",
},
{
sourcePath: "v2/templates/html/popup.ejs",
outputPath: "popup.html",
},
{
sourcePath: "v2/templates/locales",
outputPath: "_locales",
},
{
sourcePath: "v2/templates/memorable-password-word-list.jsonc",
outputPath: "memorable-password-word-list.json",
},
process.env.ENV_NAME === "production"
? {
sourcePath: "v2/templates/credentials-prd.json",
outputPath: "credentials.json",
}
: {
sourcePath: "v2/templates/credentials-dev.json",
outputPath: "credentials.json",
},
// @start V1_COMPAT
{ sourcePath: "v1/modals", outputPath: "modals" },
// @end V1_COMPAT
],
watchDirectories: ["v1", "v2", "e2e"],
} satisfies BundleConfig;