{"id":15062041,"url":"https://github.com/srgykuz/validate-html-links-webpack-plugin","last_synced_at":"2025-10-04T21:32:00.937Z","repository":{"id":57390212,"uuid":"135607066","full_name":"Amaimersion/validate-html-links-webpack-plugin","owner":"Amaimersion","description":"A plugin for webpack which replaces invalid links in HTML files.","archived":true,"fork":false,"pushed_at":"2018-06-01T14:35:55.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-29T10:47:49.990Z","etag":null,"topics":["build-automation","plugin","plugins","validate","validate-html","validate-html-links","validate-jade","validate-jade-links","validate-pug","validate-pug-links","webpack","webpack-plugin"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/validate-html-links-webpack-plugin","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Amaimersion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-31T16:08:48.000Z","updated_at":"2023-01-28T12:41:12.000Z","dependencies_parsed_at":"2022-09-13T02:32:23.943Z","dependency_job_id":null,"html_url":"https://github.com/Amaimersion/validate-html-links-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amaimersion%2Fvalidate-html-links-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amaimersion%2Fvalidate-html-links-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amaimersion%2Fvalidate-html-links-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amaimersion%2Fvalidate-html-links-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Amaimersion","download_url":"https://codeload.github.com/Amaimersion/validate-html-links-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219876787,"owners_count":16554787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-automation","plugin","plugins","validate","validate-html","validate-html-links","validate-jade","validate-jade-links","validate-pug","validate-pug-links","webpack","webpack-plugin"],"created_at":"2024-09-24T23:29:32.327Z","updated_at":"2025-10-04T21:31:55.579Z","avatar_url":"https://github.com/Amaimersion.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    Validation of links in HTML files\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    A plugin for webpack which replaces invalid links in HTML files.\n\u003c/p\u003e\n\n## Installation\n\n```javascript\nnpm install validate-html-links-webpack-plugin --save-dev\n```\n\n## Usage\n\nThe plugin replaces invalid names of resource links with correct names relative to project path. This is especially useful when files contains chunkhash and there is no other way to change this at compile time.\n\n```javascript\nconst ValidateHTMLLinksPlugin = require('validate-html-links-webpack-plugin');\n\nmodule.exports = {\n    plugins: [\n        new ValidateHTMLLinksPlugin()\n    ]\n}\n```\n\n## Options\n\n| Name        | Type            | Default                   | Description |\n| :---------: |:---------------:| :------------------------:|:------------|\n| types       | `Array\u003cString\u003e` | `['html', 'css', 'js']`   | The types for validation and replacement. Must include `html` type. |\n| exclude     | `Array\u003cString\u003e` | `[]`                      | The files that will not be processed. If you include `html` file, then the entire file will be skipped.|\n| output      | `Boolean`       |`true`                     | Show in the compilation output what has been changed. |\n\n#### Example how to set these options:\n\n```javascript\nconst ValidateHTMLLinksPlugin = require('validate-html-links-webpack-plugin');\n\nmodule.exports = {\n    plugins: [\n        new ValidateHTMLLinksPlugin({\n            types: ['html', 'js'],\n            exclude: ['/interface/js/scripts/popup.js'],\n            output: false\n        })\n    ]\n}\n```\n\n## Validation Examples\n\nBe aware that links compares by (a-z | A-Z | 0-9 | .). If comparable link has the same path and difference only in the `([[:alnum:]]|\\.)`, then it will be the same link.\n\nIn short, match conditions:\n\n- same path;\n- difference of name only in range of a-z, A-Z, 0-9 or `'.'`;\n- same type.\n\n```javascript\n/interface/js/scripts/popup.js === /interface/js/scripts/popup.abc123.min.js\n/interface/js/scripts/popup.js === /interface/js/scripts/popup.another.js // be careful with dot names!\n/interface/js/scripts/popup.js !== /interface/js/scripts/popup-another.js\n/interface/js/scripts/popup.js !== /interface/js/scripts/popup-another.abc123.min.js\n/interface/js/popup.js !== /interface/js/scripts/popup.js\n/interface/js/scripts/popup.js !== /interface/js/scripts/popup.css\n```\n\n## Issues and requests\n\nFeel free to use [issues](https://github.com/Amaimersion/validate-html-links-webpack-plugin/issues). [Pull requests](https://github.com/Amaimersion/validate-html-links-webpack-plugin/pulls) are also always welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrgykuz%2Fvalidate-html-links-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrgykuz%2Fvalidate-html-links-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrgykuz%2Fvalidate-html-links-webpack-plugin/lists"}