You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
3.0 KiB
93 lines
3.0 KiB
// Plugins
|
|
import vue from "@vitejs/plugin-vue";
|
|
import vuetify, { transformAssetUrls } from "vite-plugin-vuetify";
|
|
|
|
// Utilities
|
|
import { defineConfig } from "vite";
|
|
import { fileURLToPath, URL } from "node:url";
|
|
import AutoImport from "unplugin-auto-import/vite";
|
|
import Components from "unplugin-vue-components/vite";
|
|
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue({
|
|
template: { transformAssetUrls },
|
|
}),
|
|
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
|
|
vuetify({
|
|
autoImport: true,
|
|
}),
|
|
AutoImport({
|
|
resolvers: [ElementPlusResolver()],
|
|
}),
|
|
Components({
|
|
resolvers: [ElementPlusResolver()],
|
|
}),
|
|
],
|
|
define: { "process.env": {} },
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
},
|
|
extensions: [".js", ".json", ".jsx", ".mjs", ".ts", ".tsx", ".vue"],
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
"/v1": {
|
|
target: "http://42.235.239.240:8003/v1",
|
|
// target: "http://s3.s100.vip:26381/v1",
|
|
// target: "http://192.168.1.141:8086/v1",
|
|
// target: "http://127.0.0.1:3000/v1",
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/v1/, ""),
|
|
},
|
|
//228 215 208 140 141
|
|
"/udp": {
|
|
target: "http://42.235.239.240:8005/udp",
|
|
// target: "http://s3.s100.vip:26381/udp",
|
|
// target: "http://192.168.1.55:8001/",
|
|
// target: "http://192.168.1.141:9010/udp",
|
|
// target: "http://192.168.1.102:9010/udp",
|
|
// target: "http://192.168.8.109:9010/udp",
|
|
// target: "http://127.0.0.1:9010/udp",
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/udp/, ""),
|
|
},
|
|
"/mp3": {
|
|
// target: "http://42.235.239.240:8005/mp3",
|
|
// target: "http://s3.s100.vip:26381/mp3",
|
|
// target: "http://192.168.1.55:8001/mp3",
|
|
// target: "http://192.168.1.141:9010/mp3",
|
|
// target: "http://192.168.1.102:9010/mp3",
|
|
// target: "http://192.168.8.109:9010/mp3",
|
|
target: "http://127.0.0.1:9010/mp3",
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/mp3/, ""),
|
|
},
|
|
"/self": {
|
|
// target: "http://42.235.239.240:8005/self",
|
|
// target: "http://s3.s100.vip:26381/self",
|
|
// target: "http://192.168.1.55:8001/self",
|
|
// target: "http://192.168.1.141:9010/self",
|
|
// target: "http://192.168.1.102:9010/self",
|
|
// target: "http://192.168.1.119:9010/self",
|
|
target: "http://127.0.0.1:9001/self",
|
|
// target: "http://42.235.239.240:8016/self",
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/self/, ""),
|
|
},
|
|
// "/vedio": {
|
|
// target: "http://192.168.1.64/vedio",
|
|
// // target: "http://192.168.1.141:8086/v1",
|
|
// changeOrigin: true,
|
|
// rewrite: (path) => path.replace(/^\/vedio/, ""),
|
|
// },
|
|
},
|
|
},
|
|
build: {
|
|
sourcemap: true,
|
|
},
|
|
});
|
|
|