forked from 0xPolygon/zkevm-bridge-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
45 lines (44 loc) · 1.16 KB
/
vite.config.ts
File metadata and controls
45 lines (44 loc) · 1.16 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
import path from "path";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import checker from "vite-plugin-checker";
import svgr from "vite-plugin-svgr";
import { createHtmlPlugin } from "vite-plugin-html"
import 'dotenv/config';
// eslint-disable-next-line import/no-default-export
export default defineConfig({
build: {
sourcemap: true,
},
define: {
bridgeVersion: JSON.stringify(process.env.npm_package_version),
},
plugins: [
react({
fastRefresh: false,
}),
svgr(),
checker({
eslint: { lintCommand: 'eslint "./src/**/*.{ts,tsx}"' },
overlay: false,
typescript: true,
}),
createHtmlPlugin({
inject: {
data: {
metaTags: `<meta
name="description"
content="Simple user interface to bridge ETH and your favorite ERC-20 tokens from Ethereum to the ${process.env.VITE_REPLACE_NAME} and back"
/>`,
title: `<title>${process.env.VITE_REPLACE_NAME} Bridge</title>`,
},
},
}),
],
resolve: {
alias: [{ find: "src", replacement: path.resolve(__dirname, "src") }],
},
server: {
open: true,
},
});