feat(platform): 开源发布 - 初始化 Open AI Canvas
This commit is contained in:
commit
aea35896eb
365 files changed
+66410
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
const webDir = dirname(fileURLToPath(import.meta.url));
|
||||
const appVersion = readFileSync(resolve(webDir, "../VERSION"), "utf8").trim();
|
||||
const appChangelog = readFileSync(resolve(webDir, "../CHANGELOG.md"), "utf8");
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
define: {
|
||||
__APP_VERSION__: JSON.stringify(appVersion),
|
||||
__APP_CHANGELOG__: JSON.stringify(appChangelog),
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:8080",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/oauth/linuxdo/callback": {
|
||||
target: "http://127.0.0.1:8080",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": resolve(webDir, "src"),
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user