61 lines
2.1 KiB
JavaScript
61 lines
2.1 KiB
JavaScript
import {defineConfig} from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import vueJSX from '@vitejs/plugin-vue-jsx'
|
|
import obfuscator from 'vite-plugin-javascript-obfuscator';
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
base: '/antd/view/',
|
|
build: {
|
|
cssCodeSplit: true,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
vue: ['vue'],
|
|
'ant-design-vue': ['ant-design-vue'],
|
|
},
|
|
globals: {
|
|
vue: 'Vue',
|
|
'@form-create/ant-design-vue': 'formCreate',
|
|
'ant-design-vue': 'antd',
|
|
}
|
|
},
|
|
},
|
|
chunkSizeWarningLimit: 2000,
|
|
},
|
|
plugins: [vue(), vueJSX(), obfuscator({
|
|
apply: 'build',
|
|
options: {
|
|
compact: true,
|
|
deadCodeInjection: true,
|
|
debugProtection: false,
|
|
// debugProtectionInterval: 8000,
|
|
disableConsoleOutput: true,
|
|
identifierNamesGenerator: 'hexadecimal',
|
|
log: false,
|
|
numbersToExpressions: true,
|
|
renameGlobals: false,
|
|
selfDefending: true,
|
|
simplify: true,
|
|
// splitStrings: true,
|
|
// stringArray: true,
|
|
// stringArrayCallsTransform: false,
|
|
// stringArrayEncoding: [],
|
|
// stringArrayIndexShift: true,
|
|
// stringArrayRotate: true,
|
|
// stringArrayShuffle: true,
|
|
// stringArrayWrappersCount: 1,
|
|
// stringArrayWrappersChainedCalls: true,
|
|
// stringArrayWrappersParametersMaxCount: 2,
|
|
// stringArrayWrappersType: 'variable',
|
|
// stringArrayThreshold: 0.75,
|
|
unicodeEscapeSequence: false,
|
|
// transformObjectKeys: true,
|
|
// controlFlowFlatteningThreshold: 1,
|
|
// controlFlowFlattening: true,
|
|
// domainLock: ['pro.form-create.com', 'JQ20240514A001'],
|
|
// domainLockRedirectUrl: 'https://www.form-create.com',
|
|
target: 'browser-no-eval',
|
|
}
|
|
})]
|
|
})
|