-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathvite.config.js
55 lines (53 loc) · 1.92 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 vue from "@vitejs/plugin-vue";
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: [
{ find: "@", replacement: path.resolve(__dirname, "./src") },
{ find: "apis", replacement: path.resolve(__dirname, "./src/apis") },
{ find: "assets", replacement: path.resolve(__dirname, "./src/assets") },
{ find: "ui", replacement: path.resolve(__dirname, "./src/assets/ui") },
{
find: "components",
replacement: path.resolve(__dirname, "./src/components"),
},
{
find: "popup",
replacement: path.resolve(__dirname, "./src/components/popup"),
},
{
find: "globals",
replacement: path.resolve(__dirname, "./src/globals"),
},
{ find: "styles", replacement: path.resolve(__dirname, "./src/styles") },
{ find: "utils", replacement: path.resolve(__dirname, "./src/utils") },
],
// {
// "@": "./src",
// api: path.resolve(__dirname, "src/apis"),
// assets: path.resolve(__dirname, "src/assets"),
// ui: path.resolve(__dirname, "src/assets/ui"),
// components: path.resolve(__dirname, "src/components"),
// popup: path.resolve(__dirname, "src/components/popup"),
// globals: path.resolve(__dirname, "src/globals"),
// styles: path.resolve(__dirname, "src/styles"),
// utils: path.resolve(__dirname, "src/utils"),
// },
},
define: {
BACKDOOR_WORDS: JSON.stringify("ILOVEMEUMY"),
APP_VERSION: JSON.stringify("0.1"),
REMOTE_SOURCE_URL: JSON.stringify("0.1"),
//音频资源前后缀配置
PREFIX_ORIGN: JSON.stringify("/songs/"),
SUFFIX_ORIGN: JSON.stringify(".mp3"),
PREFIX_TUNED: JSON.stringify("/treated_songs/"),
SUFFIX_TUNED: JSON.stringify(".mp3"),
MOST_N: 5,
AVAILABLE_DAYS_LIMIT: 5,
SONGNAME_CONTAIN_VERSION: true,
},
});