Giter VIP home page Giter VIP logo

Comments (13)

jd1378 avatar jd1378 commented on August 19, 2024 1

hmm
okay
I'm sorry that I couldn't help with this
let me know if you found a way

from nuxt-obfuscator.

jd1378 avatar jd1378 commented on August 19, 2024

Hi
Obfuscating happens in 2 steps, first step is done by detecting and obfuscating css classes in post css and creating a mapping, second step is to replace it in your files according to the created mapping

my guess is it's failing in the second step, but to make sure, can you check if the first step is being done correctly by searching the obfuscation.map.json generated file for q-btn ?

from nuxt-obfuscator.

AIRGG avatar AIRGG commented on August 19, 2024

yeah all the class is generated, I have checked one by one, as you can see the output in here.
maybe the problem in the second step? because I think the first step is working

from nuxt-obfuscator.

jd1378 avatar jd1378 commented on August 19, 2024

yes, as I suspected it's the second step

sadly currently I don't know a surefire way to replace classes on the final output, however I am willing to accept contributions if you got any idea

this is the piece of code responsible for replacing classes in files:
https://github.com/jd1378/nuxt-obfuscator/blob/main/src/build/vite-plugin.ts

from what I remember, what it does is simply to find Quotes and replace the class names that it can find in the mapping

from nuxt-obfuscator.

AIRGG avatar AIRGG commented on August 19, 2024

I have some interesting again, when I try to copy from generated inspect element,
then I put it in code, it's working, maybe it's only working for typing class, not from generated component
samplecode

from nuxt-obfuscator.

jd1378 avatar jd1378 commented on August 19, 2024

yeah its probably a problem only for components outside the project files

from nuxt-obfuscator.

AIRGG avatar AIRGG commented on August 19, 2024

is there any config we can try to make it 'post', maybe we can do something like waiting component generated first, then transform it like said in here
is there will be problem or break something?

from nuxt-obfuscator.

jd1378 avatar jd1378 commented on August 19, 2024

I'm not sure, but I think I remember there was a problem with post that I didn't use it

can you try changing it locally and see how it goes for you ?

from nuxt-obfuscator.

AIRGG avatar AIRGG commented on August 19, 2024

using 'post' is not working

from nuxt-obfuscator.

AIRGG avatar AIRGG commented on August 19, 2024

I revert it back to 'pre', I think I know the problem, I try to check generated 'dist' folder, yeah it's still component or function with parameter I guess (number 1), not the generated button with class. that's why your module can't transform it when build process
but in (number 2) I type it directly it's working. Yeah I think there is nothing wrong in your module

image_2024-03-05_115745433

from nuxt-obfuscator.

jd1378 avatar jd1378 commented on August 19, 2024

Hi @AIRGG
can you try v2 and let me know if it's working as expected ?

edit: Don't there's still bugs

from nuxt-obfuscator.

jd1378 avatar jd1378 commented on August 19, 2024

ok test 2.0.1
v2 uses post, so hopefully, it should work with everything everywhere

from nuxt-obfuscator.

AIRGG avatar AIRGG commented on August 19, 2024

still not working, right now my assumption the component & the css is generated in runtime process, like I mention in here.

so when user load the page in browser, it will run function with parameter number 1, then the function will be generate the component like button with css, so I guess it will not work in build process, whatever pre or post

I revert it back to 'pre', I think I know the problem, I try to check generated 'dist' folder, yeah it's still component or function with parameter I guess (number 1), not the generated button with class. that's why your module can't transform it when build process but in (number 2) I type it directly it's working. Yeah I think there is nothing wrong in your module

image_2024-03-05_115745433

from nuxt-obfuscator.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.