What is the proper way to load external scripts in Framer Studio?
Hey guys, I'm new to Framer, so I'm probably way off base, but I'm wondering if what Joshua Tucker suggested is really the "proper way" to load external scripts. Doesn't doing it that way place all of that scripts' members into the global namespace?
I just learned that Framer utilizes modules, so isn't that the proper way? https://framer.com/docs/#modules.npm
You're asking great questions :). Start by moving the script to the folder location of your choice (best place is the /framer folder inside your Framer project folder – it's where the rest of them are).
Once you've done that, open the index.html file with a code editor (I use Xcode) in the Framer project folder and add the script. I highlighted an example of a script I added for a project a while back.
Joshua Tucker we need to talk. I can't seem to get this working reliably. :/
Jordan Robert Dobson - what's happening? Is it not loading your script at all?
Ha! As I explained earlier to Joshua... It felt like jumping through hoops inside of hoops inside of more hoops.
Pix plz :)
I think I'm going to mock up a simple example to show how I'd like to do the two way communication and see if that helps at all.
My file takes maybe 10 seconds to compile every time right now for pieces of code I never touch anymore.
I hope my example will help.
Feel free to start a group chat with Joshua Tucker and myself and once we find a reasonable solution we can share with the group.