{"id":15661722,"url":"https://github.com/jgramoll/add-hashed-assets-to-html-plugin","last_synced_at":"2026-04-18T17:31:20.337Z","repository":{"id":86062724,"uuid":"143354749","full_name":"jgramoll/add-hashed-assets-to-html-plugin","owner":"jgramoll","description":"Add a JavaScript or CSS asset with chunk hash into the HTML generated by html-webpack-plugin. ","archived":false,"fork":false,"pushed_at":"2018-08-27T15:32:34.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-30T03:42:28.957Z","etag":null,"topics":["fingerprinting","html-webpack-plugin","node","webpack","webpack-plugin","webpack4"],"latest_commit_sha":null,"homepage":null,"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/jgramoll.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-02T23:35:12.000Z","updated_at":"2024-12-30T14:52:07.000Z","dependencies_parsed_at":"2023-03-04T07:45:50.630Z","dependency_job_id":null,"html_url":"https://github.com/jgramoll/add-hashed-assets-to-html-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jgramoll/add-hashed-assets-to-html-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgramoll%2Fadd-hashed-assets-to-html-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgramoll%2Fadd-hashed-assets-to-html-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgramoll%2Fadd-hashed-assets-to-html-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgramoll%2Fadd-hashed-assets-to-html-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgramoll","download_url":"https://codeload.github.com/jgramoll/add-hashed-assets-to-html-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgramoll%2Fadd-hashed-assets-to-html-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31977963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["fingerprinting","html-webpack-plugin","node","webpack","webpack-plugin","webpack4"],"created_at":"2024-10-03T13:29:05.939Z","updated_at":"2026-04-18T17:31:20.320Z","avatar_url":"https://github.com/jgramoll.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# add-hashed-assets-to-html-plugin\n[![Build Status](https://travis-ci.org/jgramoll/add-hashed-assets-to-html-plugin.svg?branch=master)](https://travis-ci.org/jgramoll/add-hashed-assets-to-html-plugin)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a8177620695f401b93c393e42158e9c2)](https://www.codacy.com/project/jgramoll/add-hashed-assets-to-html-plugin/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=jgramoll/add-hashed-assets-to-html-plugin\u0026amp;utm_campaign=Badge_Grade_Dashboard)\n[![Coverage Status](https://coveralls.io/repos/github/jgramoll/add-hashed-assets-to-html-plugin/badge.svg?branch=master)](https://coveralls.io/github/jgramoll/add-hashed-assets-to-html-plugin?branch=master)\n[![Known Vulnerabilities](https://snyk.io/test/github/jgramoll/add-hashed-assets-to-html-plugin/badge.svg?targetFile=package.json)](https://snyk.io/test/github/jgramoll/add-hashed-assets-to-html-plugin?targetFile=package.json)\n\n## About\n\nAdd a JavaScript or CSS asset with chunk hash into the HTML generated by html-webpack-plugin. \n\n## Usage\n\nIn your webpack.config add AddHashedAssetsToHtmlPlugin with\nthe list of assets you want to add to your index.html\n\n```js\nplugins: [\n  new CopyWebpackPlugin([\n    {\n      from: path.join(root, 'src/dependencies.css'),\n      to:   path.join(root, 'dist/dependencies.[hash].css'),\n    },\n    {\n      from: path.join(root, 'src/dependencies.js'),\n      to:   path.join(root, 'dist/dependencies.[hash].js'),\n    },\n  ]),\n  new HtmlWebpackPlugin(),\n  new AddHashedAssetsToHtmlPlugin({\n    assets: [\n      {\n        from: path.join(root, 'src/dependencies.css'),\n        to:   path.join(root, 'dependencies.[hash].css'),\n      },\n      {\n        from: path.join(root, 'src/dependencies.js'),\n        to:   path.join(root, 'dependencies.[hash].js'),\n      }\n    ]\n  })\n]\n```\n\n### Output\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003ctitle\u003eWebpack App\u003c/title\u003e\n  \u003clink href=\"/dependencies.ceb361c93fdb60f8a5139da1d8ba8947.css\" rel=\"stylesheet\"\u003e\u003c/head\u003e\n  \u003cbody\u003e\n  \u003cscript type=\"text/javascript\" src=\"/dependencies.c21ffaef5051ba8a9a5104c7c850bd7b.js\"\u003e\u003c/script\u003e\u003c/body\u003e\n\u003c/html\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgramoll%2Fadd-hashed-assets-to-html-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgramoll%2Fadd-hashed-assets-to-html-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgramoll%2Fadd-hashed-assets-to-html-plugin/lists"}