JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <script src="dojo-1.7.1.js" type="text/javascript" 
            data-dojo-config="isDebug: true, async: true" ></script>
        <script type="text/javascript">
            var dojoConfig = {
                baseUrl: "/",
                tlmSiblingOfDojo: false,
                packages:[
                ]
            };
            
            require(["a"  ], function( a) {

            //var x declaration is fine
                var x  = new a.a();
            // error line below
                var y = new a.b();
            });
            
            
        </script>
        
    </head>
    <body>
    </body>
</html>

JavaScript

define([], function() {
    var a = {
        a : function() {
        },
        b : function() {
            this.x = new a.a(); // this is fine
            this.y = new this.a(); // this causes error in above html
            
        }
    }
    return a;
});