We weren't wrapping things in an IIFE so global scope was being ruined by various dependencies (e.g. window was full of minified variable names lol). This PR fixes this by wrapping everything in an IIFE and telling esbuild to assign it to global variable module.exports to fix the exports. This results in this very funny build output:
Should be ready to merge, I just want to test this heavily as it could break everything. This will also need to be brought over to the sample extension build script.
We weren't wrapping things in an IIFE so global scope was being ruined by various dependencies (e.g.
window
was full of minified variable names lol). This PR fixes this by wrapping everything in an IIFE and telling esbuild to assign it to global variable module.exports to fix the exports. This results in this very funny build output:Should be ready to merge, I just want to test this heavily as it could break everything. This will also need to be brought over to the sample extension build script.