"No such namespace" warning when referring to JS module namespace without using alias
Description
Environment
None
Attachments
1
CLJS-1820.patch
28 Oct, 2016
Activity
David Nolen October 30, 2016 at 11:12 AM
David Nolen
October 30, 2016 at 11:12 AM

Maria Geller October 28, 2016 at 2:23 AM
Maria Geller
October 28, 2016 at 2:23 AM
Added a patch for this.
Since JS modules are loaded using the new name created by the Google Closure compiler during module conversion, we always need to add an alias from the name given in the rovides compiler option to the new name.
Completed
Details
Details
Created October 13, 2016 at 9:40 PM
Updated October 30, 2016 at 11:12 AM
Resolved October 30, 2016 at 11:12 AM
Currently, when requiring a JS module it is not possible to refer to it using the original namespace. For example, the following code will result in a warning:
And the resulting JavaScript will throw the following error:
However, defining an alias for the JS module and using it works fine, for example:
Here is a minimal repo to reproduce this problem: https://github.com/mneise/my-calculator.