Set global declaration in vscode JavaScript
问题 I'm working on a JavaScript transpiler that apart from other things will also replace certain functions and variables upon build. For example the following file ( ./src/my-module.js ): defineModule("MyModule", function(exports) { return exports; }); Will be copied and converted to ( ./build/my-module.js ): (function(global, factory) { "use strict"; if (typeof exports !== "undefined" && typeof module !== "undefined") module.exports.MyModule = factory(exports.MyModule || {}); else factory