added route config
This commit is contained in:
parent
0ab58996a6
commit
90ae54a261
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,34 @@
|
||||||
|
import { defineConfig } from "vite";
|
||||||
|
import react from "@vitejs/plugin-react";
|
||||||
|
import { terser } from "rollup-plugin-terser";
|
||||||
|
|
||||||
|
export default defineConfig(({ command, mode }) => {
|
||||||
|
if (mode === "production") {
|
||||||
|
return {
|
||||||
|
plugins: [
|
||||||
|
react(),
|
||||||
|
// terser({ // Add terser plugin for production
|
||||||
|
// compress: {
|
||||||
|
// drop_console: true, // This removes all console.* statements
|
||||||
|
// },
|
||||||
|
// }),
|
||||||
|
],
|
||||||
|
base: "/apps/retail/",
|
||||||
|
envDir: "src",
|
||||||
|
envPrefix: "ENV_",
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
plugins: [react()],
|
||||||
|
envDir: "src",
|
||||||
|
envPrefix: "ENV_",
|
||||||
|
server: {
|
||||||
|
host: "192.168.1.34",
|
||||||
|
port: process.env.PORT || 3015,
|
||||||
|
},
|
||||||
|
optimizeDeps: {
|
||||||
|
exclude: ["console.log"],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue