Hello Everyone,
I have a few external modules that has to be loaded during runtime and I cannot find any other way to import it other than using script tag.
This also poses a major problem when trying to import standard JS modules.
So Does UXP support loading external modules via ‘require’ ? If not is it going to be a feature that is going to be introduced in a later version?
UXP plugins fully support loading modules with require.
Are you building a plugin or a script? It was not possible to use it in UXP Scripting. Support was added in the latest Photoshop beta version (24.2 February 2023).
I did the same thing @Maher mentioned and didn’t work the first time. But like @tomzag said, it was included in one of the latest updates, so I had to do an update on Photoshop and tried the same method @Maher mentioned and it worked!