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 ```
54 lines (53 loc) • 1.77 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Html = void 0;
var tslib_1 = require("tslib");
var RuleHandle_1 = require("./RuleHandle");
var Html = /** @class */ (function (_super) {
tslib_1.__extends(Html, _super);
function Html() {
return _super !== null && _super.apply(this, arguments) || this;
}
Html.prototype.test = function () {
return /\.html?$/i;
};
Html.prototype.loaders = function () {
return [
{
loader: 'html-loader',
options: {
attributes: {
root: '.',
list: [
{
tag: 'img',
attribute: 'src',
type: 'src',
},
{
tag: 'link',
attribute: 'href',
type: 'src',
},
{
tag: 'audio',
attribute: 'src',
type: 'src',
},
{
tag: 'video',
attribute: 'src',
type: 'src',
},
],
},
esModule: false,
// Mini by html-webpack-plugin
minimize: false,
},
}
];
};
return Html;
}(RuleHandle_1.RuleHandle));
exports.Html = Html;