Replies: 4 comments 19 replies
-
I think you can try to do this with writing a plugin on your own 🙂 |
Beta Was this translation helpful? Give feedback.
-
@soylomass, indeed I did: // vite.config.ts
import obfuscator from 'rollup-plugin-obfuscator';
import { defineConfig } from 'vite'
module.exports = defineConfig({
build: {
rollupOptions: {
output: {
plugins: [ // <-- use plugins inside output to not merge chunks on one file
obfuscator({
fileOptions: {
// options
})
]
}
},
minify: 'terser',
target: 'es2019',
terserOptions: {
compress: {
defaults: false,
}
} // ../src/ts/router.ts
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
const login = () => import('../views/login.vue');
const hosts = () => import('../views/hosts.vue');
const notFound = () => import('../views/notFound.vue');
const routes: Array<RouteRecordRaw> = [
{ path: '/login', component: login, name:'login'},
children: [
{ path: 'hosts', component: dashHosts, name: 'hosts' }
]},
{ path: '/:pathMatch(.*)*', component: notFound }
];
const router = createRouter({
history: createWebHistory(),
routes
}); |
Beta Was this translation helpful? Give feedback.
-
Hi I'm currently using https://github.com/elmeet/vite-plugin-javascript-obfuscator The problem I am facing now is that user plugins cannot run after the post-build plugins including minifier. I think this is what is causing all the problems including stringArray. The obfuscator should be the final step. Is there any way to force a plugin to run after the vite post build plugins such as minifier? |
Beta Was this translation helpful? Give feedback.
-
I am using https://github.com/z0ffy/vite-plugin-bundle-obfuscator |
Beta Was this translation helpful? Give feedback.
-
How to obfuscator the project codes when I use vite and typescript. For example, use javascript-obfuscator to obfuscator codes. But i don't find the way to do it, can you help me, thanks。
Beta Was this translation helpful? Give feedback.
All reactions