// import { defineConfig } from "vite"; // import react from "@vitejs/plugin-react"; // import sitemap from "vite-plugin-sitemap"; // export default defineConfig(({ mode }) => { // const isProd = mode === "production"; // return { // plugins: [ // react(), // isProd && // sitemap({ // hostname: "https://pozo.app", // routes: ["/", "/signin", "/signup", "/dashboard", "/features", "/pricing", "/contact-us", "/blog"], // }), // ], // base: "/home/", // envDir: "src", // envPrefix: "ENV_", // build: { // chunkSizeWarningLimit: 1000, // rollupOptions: { // output: { // manualChunks: { // vendor: ['react', 'react-dom'], // editor: ['@editorjs/editorjs', '@editorjs/header', '@editorjs/image', '@editorjs/list', '@editorjs/paragraph', '@editorjs/code', '@editorjs/embed', '@editorjs/link', '@editorjs/quote'] // } // } // } // }, // server: { // host: "192.168.1.68", // port: process.env.PORT || 3000, // }, // optimizeDeps: { // exclude: ["console.log"], // include: [ // "@editorjs/editorjs", // "@editorjs/header", // "@editorjs/image", // "@editorjs/list", // "@editorjs/paragraph", // "@editorjs/code", // "@editorjs/embed", // "@editorjs/link", // "@editorjs/quote", // ], // }, // }; // }); import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import { terser } from "rollup-plugin-terser"; // https://vitejs.dev/config/ export default defineConfig(({ command, mode, ssrBuild }) => { if (mode == "production") { return { plugins: [ react(), // terser({ // Add terser plugin for production // compress: { // drop_console: true, // This removes all console.* statements // }, // }), ], base: "/home/", envDir: "src", envPrefix: "ENV_", }; } else { return { plugins: [react()], envDir: "src", envPrefix: "ENV_", server: { host: "192.168.1.50", port: process.env.PORT || 3001, }, optimizeDeps: { exclude: ["console.log"], include: [ '@editorjs/editorjs', '@editorjs/header', '@editorjs/image', '@editorjs/delimiter', '@editorjs/list', '@editorjs/paragraph' ] }, }; } }); // export default defineConfig({ // plugins: [react()], // server: { // host: '192.168.1.17', // port: process.env.PORT || 3000, // }, // });