{"id":21841962,"url":"https://github.com/jaid/inject-body-webpack-plugin","last_synced_at":"2026-01-29T11:40:35.401Z","repository":{"id":49301340,"uuid":"245212991","full_name":"Jaid/inject-body-webpack-plugin","owner":"Jaid","description":"Webpack plugin that injects a custom string into the body of the html-webpack-plugin output.","archived":false,"fork":false,"pushed_at":"2023-03-08T04:38:23.000Z","size":4745,"stargazers_count":10,"open_issues_count":15,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T11:48:19.399Z","etag":null,"topics":["add-on","addon","html","html-webpack-plugin","html-webpack-plugin-plugin","library","node","node-js","plugin","webpack","webpack-plugin"],"latest_commit_sha":null,"homepage":"https://github.com/Jaid/inject-body-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/Jaid.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license.txt","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},"funding":{"github":"Jaid","custom":"https://twitch.tv/products/jaidchen"}},"created_at":"2020-03-05T16:26:41.000Z","updated_at":"2023-12-19T15:13:07.000Z","dependencies_parsed_at":"2024-06-18T16:51:57.269Z","dependency_job_id":"a2c9ed28-eaf8-4a05-b448-3124db89cd7d","html_url":"https://github.com/Jaid/inject-body-webpack-plugin","commit_stats":{"total_commits":72,"total_committers":2,"mean_commits":36.0,"dds":"0.19444444444444442","last_synced_commit":"ce647fc3a88f51169eae96ebee1f25b6f7d9c147"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Finject-body-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Finject-body-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Finject-body-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Finject-body-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jaid","download_url":"https://codeload.github.com/Jaid/inject-body-webpack-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248877986,"owners_count":21176239,"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":["add-on","addon","html","html-webpack-plugin","html-webpack-plugin-plugin","library","node","node-js","plugin","webpack","webpack-plugin"],"created_at":"2024-11-27T22:09:23.462Z","updated_at":"2026-01-29T11:40:35.372Z","avatar_url":"https://github.com/Jaid.png","language":"JavaScript","readme":"# inject-body-webpack-plugin\n\n\n\u003ca href=\"https://raw.githubusercontent.com/jaid/inject-body-webpack-plugin/master/license.txt\"\u003e\u003cimg src=\"https://img.shields.io/github/license/jaid/inject-body-webpack-plugin?style=flat-square\" alt=\"License\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/sponsors/jaid\"\u003e\u003cimg src=\"https://img.shields.io/badge/\u003c3-Sponsor-FF45F1?style=flat-square\" alt=\"Sponsor inject-body-webpack-plugin\"/\u003e\u003c/a\u003e  \n\u003ca href=\"https://actions-badge.atrox.dev/jaid/inject-body-webpack-plugin/goto\"\u003e\u003cimg src=\"https://img.shields.io/endpoint.svg?style=flat-square\u0026url=https%3A%2F%2Factions-badge.atrox.dev%2Fjaid%2Finject-body-webpack-plugin%2Fbadge\" alt=\"Build status\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jaid/inject-body-webpack-plugin/commits\"\u003e\u003cimg src=\"https://img.shields.io/github/commits-since/jaid/inject-body-webpack-plugin/v1.3.0?style=flat-square\u0026logo=github\" alt=\"Commits since v1.3.0\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jaid/inject-body-webpack-plugin/commits\"\u003e\u003cimg src=\"https://img.shields.io/github/last-commit/jaid/inject-body-webpack-plugin?style=flat-square\u0026logo=github\" alt=\"Last commit\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jaid/inject-body-webpack-plugin/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/jaid/inject-body-webpack-plugin?style=flat-square\u0026logo=github\" alt=\"Issues\"/\u003e\u003c/a\u003e  \n\u003ca href=\"https://npmjs.com/package/inject-body-webpack-plugin\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/inject-body-webpack-plugin?style=flat-square\u0026logo=npm\u0026label=latest%20version\" alt=\"Latest version on npm\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/jaid/inject-body-webpack-plugin/network/dependents\"\u003e\u003cimg src=\"https://img.shields.io/librariesio/dependents/npm/inject-body-webpack-plugin?style=flat-square\u0026logo=npm\" alt=\"Dependents\"/\u003e\u003c/a\u003e \u003ca href=\"https://npmjs.com/package/inject-body-webpack-plugin\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/inject-body-webpack-plugin?style=flat-square\u0026logo=npm\" alt=\"Downloads\"/\u003e\u003c/a\u003e\n\n**Webpack plugin that injects a custom string into the body of the html-webpack-plugin output.**\n\n\n\n\n\n## Installation\n\n\u003ca href=\"https://npmjs.com/package/inject-body-webpack-plugin\"\u003e\u003cimg src=\"https://img.shields.io/badge/npm-inject--body--webpack--plugin-C23039?style=flat-square\u0026logo=npm\" alt=\"inject-body-webpack-plugin on npm\"/\u003e\u003c/a\u003e\n\n```bash\nnpm install --save-dev inject-body-webpack-plugin@^1.3.0\n```\n\n\u003ca href=\"https://yarnpkg.com/package/inject-body-webpack-plugin\"\u003e\u003cimg src=\"https://img.shields.io/badge/Yarn-inject--body--webpack--plugin-2F8CB7?style=flat-square\u0026logo=yarn\u0026logoColor=white\" alt=\"inject-body-webpack-plugin on Yarn\"/\u003e\u003c/a\u003e\n\n```bash\nyarn add --dev inject-body-webpack-plugin@^1.3.0\n```\n\n\n\n## Example\n\n#### Input\n\nwebpack.config.babel.js\n```js\nimport HtmlWebpackPlugin from \"html-webpack-plugin\"\nimport InjectBodyPlugin from \"inject-body-webpack-plugin\"\n\nexport default {\n  plugins: [\n    new HtmlWebpackPlugin({\n      templateContent: \"\u003chtml\u003e\u003cbody\u003e\u003c/body\u003e\u003c/html\u003e\"\n    }),\n    new InjectBodyPlugin({\n      content: '\u003cmain id=root\u003eHi!\u003c/main\u003e'\n    }),\n  ],\n}\n```\n\n#### Output\n\nindex.html\n```html\n\u003chtml\u003e\u003cbody\u003e\u003cmain id=root\u003eHi!\u003c/main\u003e\u003c/body\u003e\u003c/html\u003e\n```\n\n\n\n\n\n\n\n## Options\n\n\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth\u003e\u003c/th\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth\u003eDefault\u003c/th\u003e\n\u003cth\u003eInfo\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003econtent\u003c/td\u003e\n\u003ctd\u003estring\u003c/td\u003e\n\u003ctd\u003e\u0026lt;div id=root/\u003e\u003c/td\u003e\n\u003ctd\u003eThe text that will be injected into the final HTML output.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eposition\u003c/td\u003e\n\u003ctd\u003estring\u003c/td\u003e\n\u003ctd\u003estart\u003c/td\u003e\n\u003ctd\u003eIf “start”, the content will be injected as close to the body opening tag as possible. If “end”, the content will be injected as close to the body ending tag as possible.\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Development\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDevelopment hints for maintaining and improving inject-body-webpack-plugin\u003c/b\u003e\u003c/summary\u003e\n\n\n\nSetting up:\n```bash\ngit clone git@github.com:jaid/inject-body-webpack-plugin.git\ncd inject-body-webpack-plugin\nnpm install\n```\nTesting in production environment:\n```bash\nnpm run test\n```\n\n\u003c/details\u003e\n\n## License\n[MIT License](https://raw.githubusercontent.com/jaid/inject-body-webpack-plugin/master/license.txt)  \nCopyright © 2021, Jaid \\\u003cjaid.jsx@gmail.com\u003e (https://github.com/jaid)\n\n\u003c!---\nReadme generated with tldw v7.1.0\nhttps://github.com/Jaid/tldw\n--\u003e","funding_links":["https://github.com/sponsors/Jaid","https://twitch.tv/products/jaidchen","https://github.com/sponsors/jaid"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaid%2Finject-body-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaid%2Finject-body-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaid%2Finject-body-webpack-plugin/lists"}