-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.ts
32 lines (31 loc) · 932 Bytes
/
vite.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
import { defineConfig, loadEnv } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
import vuetify from "vite-plugin-vuetify";
import mockAPI from "./vite-plugin-mock-api";
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
process.env["CLIENT_ID"] = env.CLIENT_ID;
process.env["CLIENT_SECRET"] = env.CLIENT_SECRET;
process.env["REDIRECT_URI"] = env.REDIRECT_URI;
return {
define: {
"process.env": {
CLIENT_ID: env.CLIENT_ID,
CLIENT_SECRET: env.CLIENT_SECRET,
REDIRECT_URI: env.REDIRECT_URI,
},
},
plugins: [vue(), vuetify({ autoImport: true }), mockAPI()],
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
},
server: {
port: 3000,
},
};
});