webpack-genius
Version:
**For chinese developers:** you'd better add taobao mirror before everything start. Or you may fail to install. ```bash yarn config set registry http://registry.npm.taobao.org ```
26 lines (25 loc) • 834 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Gzip = void 0;
var tslib_1 = require("tslib");
var compression_webpack_plugin_1 = tslib_1.__importDefault(require("compression-webpack-plugin"));
var PluginHandle_1 = require("./PluginHandle");
var Gzip = /** @class */ (function (_super) {
tslib_1.__extends(Gzip, _super);
function Gzip() {
return _super !== null && _super.apply(this, arguments) || this;
}
Gzip.prototype.collect = function () {
return [
new compression_webpack_plugin_1.default({
threshold: 8192,
test: [
/\.js(\?.*)?$/i,
/\.css(\?.*)?$/i,
],
}),
];
};
return Gzip;
}(PluginHandle_1.PluginHandle));
exports.Gzip = Gzip;