Compare commits

...

2 Commits

Author SHA1 Message Date
sugarBecomer 5729e88687 ✨ 混淆前端打包后代码 2026-03-27 16:37:14 +08:00
sugarBecomer 0681aad27d 🐛 修复生成邀请码 2026-03-27 16:32:22 +08:00
3 changed files with 44 additions and 2 deletions
+1
View File
@@ -39,6 +39,7 @@
"tw-animate-css": "^1.4.0",
"typescript": "~5.9.3",
"vite": "^8.0.1",
"vite-plugin-bundle-obfuscator": "^1.11.0",
"vue-tsc": "^3.2.5"
}
}
+1 -1
View File
@@ -34,5 +34,5 @@ export const userApi = {
/** 生成邀请码 */
generateInviteCode: () =>
request.post<any, ApiResponse>('/v1/user/generate-invite-code'),
request.post<any, ApiResponse>('/v1/user/generateInviteCode'),
}
+42 -1
View File
@@ -2,9 +2,50 @@ import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'
import { fileURLToPath, URL } from 'node:url'
import vitePluginBundleObfuscator from 'vite-plugin-bundle-obfuscator'
export default defineConfig({
plugins: [vue(), tailwindcss()],
plugins: [
vue(),
tailwindcss(),
vitePluginBundleObfuscator({
apply: 'build',
log: true,
autoExcludeNodeModules: true,
threadPool: true,
options: {
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 1,
deadCodeInjection: false,
debugProtection: false,
debugProtectionInterval: 0,
disableConsoleOutput: true,
identifierNamesGenerator: 'hexadecimal',
ignoreImports: true,
numbersToExpressions: true,
renameGlobals: false,
selfDefending: true,
simplify: true,
splitStrings: true,
splitStringsChunkLength: 5,
stringArray: true,
stringArrayCallsTransform: true,
stringArrayCallsTransformThreshold: 1,
stringArrayEncoding: ['base64'],
stringArrayIndexShift: true,
stringArrayRotate: true,
stringArrayShuffle: true,
stringArrayWrappersChainedCalls: true,
stringArrayWrappersCount: 3,
stringArrayWrappersParametersMaxCount: 4,
stringArrayWrappersType: 'function',
stringArrayThreshold: 1,
transformObjectKeys: true,
unicodeEscapeSequence: false,
},
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))