mirror of
https://github.com/blueedgetechno/win11React.git
synced 2026-01-10 06:28:11 -05:00
31 lines
568 B
JavaScript
31 lines
568 B
JavaScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { VitePWA } from "vite-plugin-pwa";
|
|
|
|
const config = ({ mode }) => {
|
|
return defineConfig({
|
|
plugins: [
|
|
react(),
|
|
VitePWA({
|
|
registerType: "autoUpdate",
|
|
}),
|
|
],
|
|
base: "",
|
|
define: {
|
|
"process.env.NODE_ENV": `"${mode}"`,
|
|
},
|
|
build: {
|
|
outDir: "build",
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: (id) => {
|
|
return "vendor";
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
};
|
|
|
|
export default config;
|