thay doi tinh nang chay trong mang noi bo
This commit is contained in:
+37
-34
@@ -1,40 +1,43 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import { defineConfig, loadEnv } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
import { traeBadgePlugin } from 'vite-plugin-trae-solo-badge';
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": "http://localhost:8000",
|
||||
"/videos": "http://localhost:8000",
|
||||
},
|
||||
},
|
||||
build: {
|
||||
sourcemap: 'hidden',
|
||||
},
|
||||
plugins: [
|
||||
react({
|
||||
babel: {
|
||||
plugins: [
|
||||
'react-dev-locator',
|
||||
],
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), "");
|
||||
const backend = env.VITE_DEV_BACKEND_URL || "http://localhost:8000";
|
||||
|
||||
return {
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": backend,
|
||||
"/videos": backend,
|
||||
},
|
||||
}),
|
||||
traeBadgePlugin({
|
||||
variant: 'dark',
|
||||
position: 'bottom-right',
|
||||
prodOnly: true,
|
||||
clickable: true,
|
||||
clickUrl: 'https://www.trae.ai/solo?showJoin=1',
|
||||
autoTheme: true,
|
||||
autoThemeTarget: '#root'
|
||||
}),
|
||||
tsconfigPaths()
|
||||
],
|
||||
test: {
|
||||
environment: "jsdom",
|
||||
setupFiles: ["./src/test/setup.ts"],
|
||||
},
|
||||
})
|
||||
},
|
||||
build: {
|
||||
sourcemap: "hidden",
|
||||
},
|
||||
plugins: [
|
||||
react({
|
||||
babel: {
|
||||
plugins: ["react-dev-locator"],
|
||||
},
|
||||
}),
|
||||
traeBadgePlugin({
|
||||
variant: "dark",
|
||||
position: "bottom-right",
|
||||
prodOnly: true,
|
||||
clickable: true,
|
||||
clickUrl: "https://www.trae.ai/solo?showJoin=1",
|
||||
autoTheme: true,
|
||||
autoThemeTarget: "#root",
|
||||
}),
|
||||
tsconfigPaths(),
|
||||
],
|
||||
test: {
|
||||
environment: "jsdom",
|
||||
setupFiles: ["./src/test/setup.ts"],
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user