teleclimber
teleclimber
DDeno
Created by teleclimber on 2/1/2025 in #help
How to initialize global variable so it can be accessed without globalThis?
OK but that doesn't explain why doing globalThis.__DEV__ = true from the main script has no effect.
8 replies
DDeno
Created by teleclimber on 2/1/2025 in #help
How to initialize global variable so it can be accessed without globalThis?
So I got it working, but if someone wants to explain enlighten me as to what's going on here I'm all ears.
8 replies
DDeno
Created by teleclimber on 2/1/2025 in #help
How to initialize global variable so it can be accessed without globalThis?
And then import that file from my index.js entrypoint. globalThis.__DEV__ = true works from a file that is imported, but it doesn't work if I type the exact same thing in my index.ts.
8 replies
DDeno
Created by teleclimber on 2/1/2025 in #help
How to initialize global variable so it can be accessed without globalThis?
I have to initialize the values in a separate file, using globalThis:
8 replies
DDeno
Created by teleclimber on 2/1/2025 in #help
How to initialize global variable so it can be accessed without globalThis?
I think I figured it out. Or at least I found a way to make it work, even if I don't understand why it works.
8 replies