ghostdevv / rollup-obfuscator

A plugin to obfuscate javascript for rollup based on https://www.npmjs.com/javascript-obfuscator
MIT License
55 stars 7 forks source link

process is not defined #108

Closed CRC32EX closed 2 years ago

CRC32EX commented 2 years ago

Steps to reproduce this issue

  1. Init Vue3 project

    npm init vue@latest

    image

  2. Install modules

    cd vue-project
    npm install
    npm install -D rollup-obfuscator javascript-obfuscator
  3. Edit vite.config.ts

    vim vite.config.ts

    image

  4. Build

    npm run build
  5. Start local webserver

    cd vue-project/dist
    python -m http.server 8000
  6. Open URL

    http://127.0.0.1:8000
  7. Error

    Uncaught ReferenceError: process is not defined
    at index.64907874.js:1:11585

image

ghostdevv commented 2 years ago

If you remove the plugin is process still undefined? @CRC32EX

CRC32EX commented 2 years ago

image image

ghostdevv commented 2 years ago

Been looking into it and seems to only effect vue, will continue to try and figure it out. Unfortunately setting the target of the obfuscator to browser didn't fix it

ghostdevv commented 2 years ago

@CRC32EX This is fixed in 2.1.2