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:
- Each UXP plug-in needs it’s own manifest file with details on the plug-in’s id and application requirement.
- Manifest files must be named
- The plug-in can’t contain anything from folders outside the folder that holds the
manifest.jsonfile. 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.
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.