UNPKG

html-validate-vue-webpack-plugin

Version:

extract html-validate rules from Vue single file components

21 lines (20 loc) 911 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HtmlValidateVueWebpackPlugin = void 0; const schema_utils_1 = require("schema-utils"); const webpack_config_1 = require("./webpack-config"); const schema = { type: "object", properties: {}, }; class HtmlValidateVueWebpackPlugin { constructor(options = {}) { (0, schema_utils_1.validate)(schema, options, { name: "HtmlValidateVueWebpackPlugin" }); } apply(compiler) { var _a, _b, _c, _d; (_b = (_a = compiler.options.module) === null || _a === void 0 ? void 0 : _a.rules) === null || _b === void 0 ? void 0 : _b.push(...((_d = (_c = webpack_config_1.webpackConfig.module) === null || _c === void 0 ? void 0 : _c.rules) !== null && _d !== void 0 ? _d : [])); } } exports.HtmlValidateVueWebpackPlugin = HtmlValidateVueWebpackPlugin; exports.default = HtmlValidateVueWebpackPlugin;