// legacy.js —— 非 AMD 的老库:只往全局挂一个构造函数 window.LegacyCounter = function LegacyCounter() { this.n = 0; }; window.LegacyCounter.prototype.inc = function () { this.n += 1; return this.n; };