2025-06-14 15:36:38 +00:00
|
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
|
import react from '@vitejs/plugin-react-swc';
|
|
|
|
|
import path from "path";
|
|
|
|
|
import { env } from "process";
|
|
|
|
|
import { defineConfig } from 'vite';
|
2026-02-08 20:06:33 +00:00
|
|
|
import { viteObfuscateFile } from 'vite-plugin-obfuscator';
|
2025-06-14 15:36:38 +00:00
|
|
|
|
|
|
|
|
// https://vite.dev/config/
|
|
|
|
|
export default defineConfig({
|
2026-02-08 20:06:33 +00:00
|
|
|
plugins: [
|
|
|
|
|
react(),
|
|
|
|
|
tailwindcss(),
|
|
|
|
|
viteObfuscateFile({
|
|
|
|
|
compact: true,
|
|
|
|
|
controlFlowFlattening: false,
|
|
|
|
|
deadCodeInjection: false,
|
|
|
|
|
debugProtection: false,
|
|
|
|
|
identifierNamesGenerator: 'hexadecimal',
|
|
|
|
|
renameGlobals: false,
|
|
|
|
|
stringArray: true,
|
|
|
|
|
stringArrayThreshold: 0.75,
|
|
|
|
|
stringArrayEncoding: ['base64'],
|
|
|
|
|
splitStrings: true,
|
|
|
|
|
splitStringsChunkLength: 10,
|
|
|
|
|
}),
|
|
|
|
|
],
|
2025-06-16 22:43:46 +00:00
|
|
|
build: {
|
2026-02-08 20:06:33 +00:00
|
|
|
outDir: "dist",
|
|
|
|
|
sourcemap: false,
|
2025-06-16 22:43:46 +00:00
|
|
|
},
|
2025-06-14 15:36:38 +00:00
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
"@": path.resolve(__dirname, "./src"),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
server: {
|
|
|
|
|
allowedHosts: [
|
|
|
|
|
env.DEV_HOST ?? 'localhost',
|
2026-02-06 20:55:10 +00:00
|
|
|
'wrongmove.viktorbarzin.me',
|
2025-06-14 15:36:38 +00:00
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
})
|