You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a minification option that converts module code of the form:
// these lines currently get added by the ide
Modules.removeAllCached();
Modules.addModule("x","exports.foo = function() {console.log('Hello'); };exports.unused = 42;");
// actual code
var a = require("x");
a.foo();
to something like:
// these lines currently get added by the ide
var required_x = (function(){
var exports = {};
exports.foo = function() {console.log('Hello'); };
exports.unused = 42;
return exports;
})();
// actual code
var a = required_x;
a.foo();
This might need some tweaking, but the idea is that when the minifier runs, it can:
Inline small functions/variables in modules
Make function names in modules a single name
Detect unused functions and totally remove them
This would massively decrease the size of uploaded code.
The text was updated successfully, but these errors were encountered:
Add a minification option that converts module code of the form:
to something like:
This might need some tweaking, but the idea is that when the minifier runs, it can:
This would massively decrease the size of uploaded code.
The text was updated successfully, but these errors were encountered: