ai generated solutions to our ai generated problems
This commit is contained in:
+1
-31
@@ -2,36 +2,6 @@ import path from 'node:path'
|
||||
import { defineConfig, loadEnv } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import obfuscatorPlugin from 'rollup-plugin-obfuscator'
|
||||
|
||||
const OBFUSCATOR_OPTIONS = {
|
||||
compact: true,
|
||||
controlFlowFlattening: false,
|
||||
deadCodeInjection: false,
|
||||
debugProtection: false,
|
||||
disableConsoleOutput: false,
|
||||
identifierNamesGenerator: 'hexadecimal',
|
||||
log: false,
|
||||
numbersToExpressions: false,
|
||||
renameGlobals: false,
|
||||
selfDefending: false,
|
||||
simplify: true,
|
||||
splitStrings: false,
|
||||
stringArray: true,
|
||||
stringArrayCallsTransform: false,
|
||||
stringArrayEncoding: ['base64'],
|
||||
stringArrayRotate: true,
|
||||
stringArrayShuffle: true,
|
||||
stringArrayThreshold: 0.75,
|
||||
transformObjectKeys: false,
|
||||
unicodeEscapeSequence: false,
|
||||
}
|
||||
|
||||
function obfuscate() {
|
||||
const factory = obfuscatorPlugin.default || obfuscatorPlugin
|
||||
const inner = factory({ global: true, options: OBFUSCATOR_OPTIONS })
|
||||
return { ...inner, apply: 'build', enforce: 'post' }
|
||||
}
|
||||
|
||||
const MAX_TEAM_NAME_LENGTH = 80
|
||||
|
||||
@@ -170,7 +140,7 @@ export default defineConfig(({ mode }) => {
|
||||
return {
|
||||
root: path.resolve(__dirname, 'frontend'),
|
||||
publicDir: path.resolve(__dirname, 'frontend/public'),
|
||||
plugins: [comingSoonDev(comingSoon), apiGuard(), react(), tailwindcss(), obfuscate()],
|
||||
plugins: [comingSoonDev(comingSoon), apiGuard(), react(), tailwindcss()],
|
||||
build: {
|
||||
outDir: path.resolve(__dirname, 'dist'),
|
||||
emptyOutDir: true,
|
||||
|
||||
Reference in New Issue
Block a user