Skip to main content
Inspiring
December 22, 2021
Question

Divide js / jsx into several files with inclusion (include)

  • December 22, 2021
  • 1 reply
  • 298 views

Hi,

writing a Exstension that will be running in Indesign, Illustrator, Photoshop an Premiere Pro.

Eveything working correct, but to get a little nicer structure, I thought I would split the code in different files... Great surprise waited for me !

Illustrator & Indesign can handle inclusion with,

//@include 'json2.js';
//@include 'logutils.js';
//@include 'collectData.jsx';
//@include 'collectAllImagesOnPage.jsx';

but not Photoshop ... 

My "workaround" is to have all code in one .jsx file, then all products works like a charm....

 

Anyone else who has had the same experience, and is there a solution to it?

 

 

This topic has been closed for replies.

1 reply

erinferinferinf
Adobe Employee
Adobe Employee
January 5, 2022

When you say it didn't work in Photoshop, are you on an M1 Mac? Photoshop running natively on M1 no longer runs CEP... 

Inspiring
February 24, 2022

Thank you for Your answer, no i'm not running on M1 

2,6 GHz 6-Core Intel Core i7

 

My work around was to add all code in same file, for now....

 

ps, any news in Photoshop M1 CEP support ? (and why that isnt supported ?)