Hi
We’re currently trying to migrate from atlassian-soy-cli to @atlassian/soy-loader. The generated code looks like this:
// Exposed to window by expose-soy
window.RWJS = window.RWJS || {};
// This file was automatically generated from template11.soy.
// Please don't edit this file by hand.
/**
* @fileoverview Templates in namespace RWJS.Templates.Dialogs.
*/
if (typeof RWJS == 'undefined') { var RWJS = {}; }
if (typeof RWJS.Templates == 'undefined') { RWJS.Templates = {}; }
if (typeof RWJS.Templates.Dialogs == 'undefined') { RWJS.Templates.Dialogs = {}; }
...
...
First it creates an RWJS object in window if none exist, which is great; but then it creates another with global scope:
if (typeof RWJS == 'undefined') { var RWJS = {}; }
From then on, all our soy templates (RWJS.Templates.Buttons, RWJS.Templates.Dialogs etc.) are added to this object and window.RWJS doesn’t receive any of it:
Completely lost as to how to proceed from here. Any ideas?