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 ```
35 lines (34 loc) • 1.2 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LessAntd = void 0;
var tslib_1 = require("tslib");
var path_1 = tslib_1.__importDefault(require("path"));
var Less_1 = require("./Less");
var LessAntd = /** @class */ (function (_super) {
tslib_1.__extends(LessAntd, _super);
function LessAntd() {
return _super !== null && _super.apply(this, arguments) || this;
}
LessAntd.prototype.onInit = function () {
_super.prototype.onInit.call(this);
this.disableCssModules();
this.setOptions('less-loader', function (options) {
options.lessOptions.modifyVars = {};
options.lessOptions.javascriptEnabled = true;
});
};
LessAntd.prototype.theme = function (theme) {
this.setOptions('less-loader', function (options) {
options.lessOptions.modifyVars = theme;
});
return this;
};
LessAntd.prototype.exclude = function () {
return undefined;
};
LessAntd.prototype.include = function () {
return path_1.default.resolve('./node_modules/antd/');
};
return LessAntd;
}(Less_1.Less));
exports.LessAntd = LessAntd;