-
Notifications
You must be signed in to change notification settings - Fork 38
/
vite.token-bridge.config.ts
82 lines (81 loc) · 2.25 KB
/
vite.token-bridge.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
import { defineConfig } from "vite";
import viteConfig from "./vite.config";
import { createHtmlPlugin } from "vite-plugin-html";
import { resolve } from "path";
import packageJson from "./package.json";
// https://vitejs.dev/config/
export default defineConfig({
...viteConfig,
resolve: {
...viteConfig.resolve,
alias: [
...((viteConfig.resolve?.alias as []) || []),
{
find: "@env",
replacement: resolve(
__dirname,
`./src/env/token-bridge.${process.env.VITE_APP_CLUSTER === "Mainnet" ? "mainnet" : "testnet"}.ts`
),
},
],
},
define: {},
plugins: [
...(viteConfig.plugins as []),
createHtmlPlugin({
inject: {
tags: [
{
injectTo: "head-prepend",
tag: "meta",
attrs: {
name: "Portal Bridge",
content: `v${process.env.VITE_APP_VERSION || "0.0.0"}`,
},
},
{
injectTo: "head-prepend",
tag: "meta",
attrs: {
name: "Wormhole connect",
content: `v${packageJson.dependencies["@wormhole-foundation/wormhole-connect"]}`,
},
},
{
injectTo: "head-prepend",
tag: "title",
children: "Portal Token Bridge",
},
{
injectTo: "head-prepend",
tag: "meta",
attrs: { "og:title": "Portal Token Bridge" },
},
{
injectTo: "head-prepend",
tag: "meta",
attrs: { "og:url": "https://portalbridge.com" },
},
{
injectTo: "head-prepend",
tag: "meta",
attrs: {
name: "description",
content:
"Portal is a bridge that offers unlimited transfers across chains for tokens and NFTs wrapped by Wormhole.",
},
},
{
injectTo: "head-prepend",
tag: "meta",
attrs: {
property: "og:description",
content:
"Portal is a bridge that offers unlimited transfers across chains for tokens and NFTs wrapped by Wormhole.",
},
},
],
},
}),
],
});