Make it possible to share code globally while respecting published releases

Any preloaded JS code (/settings/code) is shared across all releases (published or not), which defeats the point of using releases.

It would be great if there was a global variable or something like that that would be saved along with the rest of the release information.

@nacho curious what your use case is here - are you adding new JS code that you only want to show up in a published release?

I have an app with multiple JS queries and they need to call the same functions, so I’ve put them in preloaded JS (is there a better way?). Whenever I make a change to the shared function and leave the app in a temporary non-working state, the users of my app get an error. This doesn’t happen when I change the JS queries because they are handled by the releases feature.

Gotcha, that makes a lot more sense. This is a interesting use case - aligns with what I’ve seen in First class JavaScript functions (with workaround)

We definitely should work on first class JS functions so you can avoid this.

2 Likes

Thanks for the link. That seems like a doable workaround for now. :+1:

1 Like