-
Notifications
You must be signed in to change notification settings - Fork 39
/
vite.usdc-bridge.config.ts
85 lines (83 loc) · 2.36 KB
/
vite.usdc-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
83
84
85
import { defineConfig } from "vite";
import viteConfig from "./vite.config";
import { resolve } from "path";
import { createHtmlPlugin } from "vite-plugin-html";
import packageJson from "./package.json";
const PUBLIC_URL = viteConfig.base;
// https://vitejs.dev/config/
export default defineConfig({
...viteConfig,
resolve: {
...viteConfig.resolve,
alias: [
...((viteConfig.resolve?.alias as []) || []),
{
find: "@env",
replacement: resolve(
__dirname,
`./src/env/usdc-bridge.${process.env.VITE_APP_CLUSTER === "Mainnet" ? "mainnet" : "testnet"}.ts`
),
},
],
},
base: `${PUBLIC_URL}/usdc-bridge/`,
define: {},
plugins: [
...(viteConfig.plugins as []),
createHtmlPlugin({
inject: {
tags: [
{
injectTo: "head-prepend",
tag: "meta",
attrs: {
name: "USDC 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 USDC Bridge",
},
{
injectTo: "head-prepend",
tag: "meta",
attrs: { "og:title": "Portal USDC Bridge" },
},
{
injectTo: "head-prepend",
tag: "meta",
attrs: { "og:url": "https://portalbridge.com/usdc-bridge" },
},
{
injectTo: "head-prepend",
tag: "meta",
attrs: {
name: "description",
content:
"Convert some USDC to ETH, AVAX, BASE, OP or ARB and use it as gas to pay for transaction fees on the destination network.",
},
},
{
injectTo: "head-prepend",
tag: "meta",
attrs: {
property: "og:description",
content:
"Convert some USDC to ETH, AVAX, BASE, OP or ARB and use it as gas to pay for transaction fees on the destination network.",
},
},
],
},
}),
],
});