You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, let's say I have a js file with dot in its name, e.g xyz.template.js. And I want to expose it into my global variable modules => modules['xyz.template.js'].
According to the source code below(value.split(".")), it is not possible to expose a variable which name contains 'dot'. I think it should be able to do that,
functionaccesorString(value){varchildProperties=value.split(".");// Not able to expose 'xyz.template' varlength=childProperties.length;varpropertyString="global";varresult="";for(vari=0;i<length;i++){if(i>0)result+="if(!"+propertyString+") "+propertyString+" = {};\n";propertyString+="["+JSON.stringify(childProperties[i])+"]";}result+="module.exports = "+propertyString;returnresult;}
Please correct me if I was wrong about this.
The text was updated successfully, but these errors were encountered:
Hi guys, let's say I have a js file with dot in its name, e.g
xyz.template.js
. And I want to expose it into my global variablemodules
=>modules['xyz.template.js']
.According to the source code below(
value.split(".")
), it is not possible to expose a variable which name contains 'dot'. I think it should be able to do that,Please correct me if I was wrong about this.
The text was updated successfully, but these errors were encountered: