Skip to content

Instantly share code, notes, and snippets.

@mrsharpoblunto
Created October 30, 2019 17:55
Show Gist options
  • Save mrsharpoblunto/2115397d51c27a23e88a50307083e328 to your computer and use it in GitHub Desktop.
Save mrsharpoblunto/2115397d51c27a23e88a50307083e328 to your computer and use it in GitHub Desktop.
// Module A
window.globalState = { 'foo': 'bar' };
// Module B
module.exports = function() {
console.log(window.globalState);
}
// Module C
const A = require('A');
const B = require('B');
B();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment