flexxui / pscript

Python to JavaScript compiler
http://pscript.readthedocs.io
BSD 2-Clause "Simplified" License
256 stars 25 forks source link

Preserve full qualited import name for browser #48

Closed RomanKharin closed 3 years ago

RomanKharin commented 3 years ago

Preserver full object name with dotted name (eg module_2.MyClass). So import in browser also will be like

root.module_1 = factory(root.module_2.MyClass);

when imports is ["module_2.MyClass as MyClass"]

almarklein commented 3 years ago

I'm not sure about this change, tbh. I probably added save_name for a reason, and I cannot oversee the consequences of removing it.

almarklein commented 3 years ago

I'm closing this. If there is a problem that this solves for you, then let's discuss that problem first. The proposes solution is likely to introduce new problems in other places :)