Skip to main content
Inspiring
October 5, 2023
Answered

How to link or Include files inside the Premiere.jsx file

  • October 5, 2023
  • 1 reply
  • 1656 views

I was getting the "JSON undefined error" in my Premiere.jsx file and resolved by embedding the json2.js file directly into my Premiere.jsx.  This solved "JSON undefined error" problem however I would rather link to the json2.js file instead of embedding the whole thing in my Premiere.jsx file.

To link files in html, I would do something like this... 

<script src="./main.js"></script>"

To link files in Java or C++ I would use #import or #include

How do I link to separate files in Premiere.jsx???
This topic has been closed for replies.

1 reply

Bruce Bullis
Bruce BullisCorrect answer
Legend
October 5, 2023
Inspiring
October 5, 2023

Thank you for your reply.  I've tried most of the directives in the doc you referenced and none of them work in the Premiere.jsx files.  I've attached an example of what I'm getting (please see attached error)

Inspiring
October 5, 2023

What's a .jsxinc file? 


It's the example referenced in the preprocess-directives link you provided.  It says "As a convention, use the file extension .jsxinc for JavaScript include files"

But I get the same error no matter what the file is for example #include json2.js gets the same error.
if I use the @ instead of # I get an error saying decoration is not supported.