Forum Discussion

Husain's avatar
Husain
Icon for Advocate I rankAdvocate I
6 years ago
Solved

Extract Visual.ts file from pbiviz file

Hi,   If I share a  custom visual's pbiviz file which I have developed with someone, can he see the source code or decode it in someway (for e.g the visual.ts and other files). Is there a way to...
  • jppp's avatar
    6 years ago

    When you package a Power BI Custom Visuals the TypeScript source like visual.ts is first compiled to JavaScript en then minified (https://en.wikipedia.org/wiki/Minification_(programming)) and stored with all the metadata in one big JSON file, which is zipped and ready to distribute.

     

    So yes, everybody that is using your custom visual has the option to 'read' the code you have written. Due to the minification it is not that easy, but not impossible. All CVs are client side scripts and are interpertered by a browser in the client space. And therfor there is no way to protect your code.  

     

    -JP