|
|
@@ -6,6 +6,7 @@ import postcsspxtoviewport from 'postcss-px-to-viewport-8-plugin'
|
|
|
import autoprefixer from 'autoprefixer'
|
|
|
import Components from 'unplugin-vue-components/vite'
|
|
|
import { VantResolver } from 'unplugin-vue-components/resolvers'
|
|
|
+import { viteObfuscateFile } from 'vite-plugin-obfuscator'
|
|
|
|
|
|
function pathResolve(dir) {
|
|
|
// eslint-disable-next-line no-undef
|
|
|
@@ -40,6 +41,61 @@ export default defineConfig({
|
|
|
'esnext.global-this',
|
|
|
'esnext.string.match-all'
|
|
|
]
|
|
|
+ }),
|
|
|
+ viteObfuscateFile({
|
|
|
+ compact: true,
|
|
|
+ controlFlowFlattening: false,
|
|
|
+ controlFlowFlatteningThreshold: 0.75,
|
|
|
+ deadCodeInjection: false,
|
|
|
+ deadCodeInjectionThreshold: 0.4,
|
|
|
+ debugProtection: false,
|
|
|
+ debugProtectionInterval: 0,
|
|
|
+ disableConsoleOutput: false,
|
|
|
+ domainLock: [],
|
|
|
+ domainLockRedirectUrl: 'about:blank',
|
|
|
+ forceTransformStrings: [],
|
|
|
+ identifierNamesCache: null,
|
|
|
+ identifierNamesGenerator: 'hexadecimal',
|
|
|
+ identifiersDictionary: [],
|
|
|
+ identifiersPrefix: '',
|
|
|
+ ignoreImports: false,
|
|
|
+ inputFileName: '',
|
|
|
+ log: false,
|
|
|
+ numbersToExpressions: false,
|
|
|
+ optionsPreset: 'default',
|
|
|
+ renameGlobals: false,
|
|
|
+ renameProperties: false,
|
|
|
+ renamePropertiesMode: 'safe',
|
|
|
+ reservedNames: [],
|
|
|
+ reservedStrings: [],
|
|
|
+ seed: 0,
|
|
|
+ selfDefending: false,
|
|
|
+ simplify: true,
|
|
|
+ sourceMap: false,
|
|
|
+ sourceMapBaseUrl: '',
|
|
|
+ sourceMapFileName: '',
|
|
|
+ sourceMapMode: 'separate',
|
|
|
+ sourceMapSourcesMode: 'sources-content',
|
|
|
+ splitStrings: false,
|
|
|
+ splitStringsChunkLength: 10,
|
|
|
+ stringArray: true,
|
|
|
+ stringArrayCallsTransform: true,
|
|
|
+ stringArrayCallsTransformThreshold: 0.5,
|
|
|
+ stringArrayEncoding: [],
|
|
|
+ stringArrayIndexesType: [
|
|
|
+ 'hexadecimal-number'
|
|
|
+ ],
|
|
|
+ stringArrayIndexShift: true,
|
|
|
+ stringArrayRotate: true,
|
|
|
+ stringArrayShuffle: true,
|
|
|
+ stringArrayWrappersCount: 1,
|
|
|
+ stringArrayWrappersChainedCalls: true,
|
|
|
+ stringArrayWrappersParametersMaxCount: 2,
|
|
|
+ stringArrayWrappersType: 'variable',
|
|
|
+ stringArrayThreshold: 0.75,
|
|
|
+ target: 'browser',
|
|
|
+ transformObjectKeys: false,
|
|
|
+ unicodeEscapeSequence: false
|
|
|
})
|
|
|
|
|
|
],
|