Closed johnschatner closed 8 months ago
For anyone encountering the same problem in the future you have to add the plugin to the worker.plugins prop in your Vite config.
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
obfuscator({
options: {
// See what's allowed: https://github.com/javascript-obfuscator/javascript-obfuscator
},
}),
],
worker: {
plugins: [
obfuscator({
options: {
// See what's allowed: https://github.com/javascript-obfuscator/javascript-obfuscator
},
}),
],
},
Describe the bug
Regardless of using global or the include option with the following to find any webworkers they aren't being obfuscated: obfuscator({ include: [ "/*.worker.js", "*/.worker.ts", "/*.worker.jsx", "*/.worker.tsx", ... ]
rollup-plugin-obfuscator
and not injavascript-obfuscator
To Reproduce
Stack trace
Package versions:
rollup-plugin-obfuscator
: v1.1.0javascript-obfuscator
: v4.1.0Additional context Add any other context about the problem here.