rollup-obfuscator icon indicating copy to clipboard operation
rollup-obfuscator copied to clipboard

Destructive error when building with Vite

Open FeiFanLiang opened this issue 1 year ago • 5 comments

image image

When building, the error this?.debug is not a function will be prompted. I solved the problem by manually deleting these two lines in the code, but the built product did not run properly.

image

I used Typescript's alias,This resulted in the project not being able to find the page file for the response. This problem occurs when I turn on stringArray and builds normally when turned off, but I would really like to use this option

I uploaded a minimally reproducible code to the warehouse, and I only need to run pnpm build pnpm preview to reproduce it. https://github.com/FeiFanLiang/rollup-obfuscator-debugger

FeiFanLiang avatar Dec 01 '23 10:12 FeiFanLiang

experiencing this as well.

GabrielMahan avatar Dec 05 '23 17:12 GabrielMahan

Not totally sure how the debugging stuff is supposed to work, but I made a quick PR to address: https://github.com/ghostdevv/rollup-obfuscator/pull/149.

GabrielMahan avatar Dec 05 '23 19:12 GabrielMahan

@GabrielMahan @FeiFanLiang could you confirm that this is now fixed in v4.1.1?

ghostdevv avatar Dec 06 '23 01:12 ghostdevv

No, I still have a similar issue. Removing the 2 this.debug lines does not change anything.

I do not have time (right now) to create a minimal reproducible example but what I observed :

  • Happens with stringArray: true
  • Generates errors on build like:
    • src/modules/ui/App.vue (1:964): Error when using sourcemap for reporting an error: Can't resolve original location of error.
    • not always the same files (kind of randomness)!
  • Crash the application with resolution error:
    • TypeError: Failed to resolve module specifier '@/modules/ui/views/Idle.vue' (which is imported in the App.vue…)
    • not always in the same way
    • probably related to the random behavior (see upper)

I will try to make it reproducible somewhere later.

thierrymichel avatar Jun 11 '24 14:06 thierrymichel

FYI, similar behaviour with rollup-plugin-obfuscator

thierrymichel avatar Jun 11 '24 14:06 thierrymichel