How can I change the isomorphic namespace to custom one in client side
Hi, I would like to know where I can change the window.isomorphic namespace to another one from total.js framework itself??
Thank you
Hi @ameykshirsagar you can change it in config file see this https://docs.totaljs.com/latest/en.html#api~FrameworkConfiguration~directory-isomorphic
@molda : Thank you
@ameykshirsagar this is not possible what you want. Maybe we can add a new option for it, but this is not good solution. Thanks!
@petersirka : I was asking about it because window.isomorphic as a namespace exposed in window object can be too obvious to find out the isomorphic function's internals via browser's developer tools as it straight away prints out the entire isomorphic function. It could probably be good to follow the folder's name as a namespace so that the user can create its own namespace easily.
What do you say??
Your idea is not possible for the current state, but we can add e.g. exports.namespace="mycode" and the framework registers this namespace as a global variable for both sides (server/client). This is possible.
@petersirka : Cool. No issues. For now I shall do the masking on the client side.
I have looked into it and it's very hard to add it. The isomorphic variable is initialized before the framework is loaded and according this variable is created a mapping. I wonder that this is not good idea and I tought that the implemetation will be more simple. I hope that you have a solution for it now.
Sorry 👎