-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
55 lines (51 loc) · 1.25 KB
/
vite.config.js
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
import { defineConfig } from 'vite';
import path from "path";
import react from '@vitejs/plugin-react';
import dotenv from 'dotenv';
import UnpluginInjectPreload from 'unplugin-inject-preload/vite';
import VitePluginBuildMetadata from 'vite-plugin-build-metadata';
import ogPlugin from 'vite-plugin-open-graph';
dotenv.config();
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react({
babel: {
plugins: ["@babel/plugin-syntax-import-attributes"]
}
}),
UnpluginInjectPreload({
files: [{
entryMatch: /.*\.ttf/
}]
}),
VitePluginBuildMetadata(),
ogPlugin({
basic: {
title: "Sword Manager",
type: "website",
url: process.env.VITE_URL || "http://sword-manager.pages.dev",
image: {
url: "./src/swordlogo.png",
type: "image/png",
width: 300,
height: 300,
alt: "Sword with Gear"
},
description: "100% client sided Sword Battle account manager written in react"
},
twitter: {
}
})
],
base: process.env.VITE_BASE_URL || "/",
server: {
hmr: false,
host: '0.0.0.0',
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
}
})