Can we use one UXP plugin for both InDesign and Photoshop?

Hi all,
I am developing a UXP plugin for InDesign app and I want to use same plugin for Photoshop as well. Can we do this if yes then how?

Easily? No, stuff can’t be shared because:

  1. Each UXP plug-in needs it’s own manifest file with details on the plug-in’s id and application requirement.
  2. Manifest files must be named manifest.json
  3. The plug-in can’t contain anything from folders outside the folder that holds the manifest.json file. Internal folders are fine, just not exterior folders.

The best, that I’m aware of, would be to develop the equivalent of a library of code and then use WebPack (or equivalents) to copy the shared code to each plug-in’s root folder holding the manifest file.

jsw

Well the manifest schema definitions says that host property can also be an array and each host item can have its own entrypoints. But in reality this is not yet implemented or supported in any host app known to me. Maybe in future version of manifest or UXP.

What you can do is to make single code base… add condition if/else based on host app. And then setup webpack to place different manifest file into bundle.

1 Like