hello how do you access variables in bundle.js?
I am trying to make a client side javascript and play around with variables and functions but am having trouble calling them in index.html, chrome-console.
I use browserify to bundle my script.js into bundle.js (which helps me with 'require' which the browser does not recognize), however when I try to access variables or functions defined in the script.js, now bundle.js I get e.g. Uncaught ReferenceError: xx is not defined
Any help? Or am I not allowed to use node packages on client side html/scripts?
edit: did a bit of googling and came upon this guy who says I should use XHR / AJAX "require" is not defined error- javascript
edit2: window.xx = xx seems to be a temporary solution
<script src="bundle.js"></script>