{"id":16694055,"url":"https://github.com/haoliangyu/html-webpack-processing-plugin","last_synced_at":"2025-04-10T01:33:15.591Z","repository":{"id":12614035,"uuid":"72363192","full_name":"haoliangyu/html-webpack-processing-plugin","owner":"haoliangyu","description":"html-webpack-plugin extension for html pre-processing and post-processing","archived":false,"fork":false,"pushed_at":"2023-01-07T11:12:20.000Z","size":1303,"stargazers_count":4,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T03:11:31.393Z","etag":null,"topics":["event","html-webpack-plugin","webpack","webpack-plugin"],"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/haoliangyu.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":"2016-10-30T17:09:36.000Z","updated_at":"2023-03-08T03:05:37.000Z","dependencies_parsed_at":"2023-01-13T17:02:30.393Z","dependency_job_id":null,"html_url":"https://github.com/haoliangyu/html-webpack-processing-plugin","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoliangyu%2Fhtml-webpack-processing-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoliangyu%2Fhtml-webpack-processing-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoliangyu%2Fhtml-webpack-processing-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoliangyu%2Fhtml-webpack-processing-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haoliangyu","download_url":"https://codeload.github.com/haoliangyu/html-webpack-processing-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140699,"owners_count":21054337,"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":["event","html-webpack-plugin","webpack","webpack-plugin"],"created_at":"2024-10-12T16:43:35.600Z","updated_at":"2025-04-10T01:33:15.543Z","avatar_url":"https://github.com/haoliangyu.png","language":"JavaScript","readme":"# html-webpack-processing-plugin\n\n[![npm](https://img.shields.io/npm/v/html-webpack-processing-plugin)](https://www.npmjs.com/package/html-webpack-processing-plugin) [![NPM](https://img.shields.io/npm/l/html-webpack-processing-plugin)](https://github.com/haoliangyu/html-webpack-processing-plugin/blob/master/LICENSE) [![Build Status](https://www.travis-ci.org/haoliangyu/html-webpack-processing-plugin.svg?branch=master)](https://www.travis-ci.org/haoliangyu/html-webpack-processing-plugin)\n\nHTML pre-processing and post-processing for [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin). It supports webpack v4.\n\n## Installation\n\n```bash\nnpm install html-webpack-processing-plugin\n```\n\n## Usage\n\n- add pre-processor\n\n```javascript\nconst HtmlWebpackPlugin = require(\"html-webpack-plugin\");\nconst HtmlWebpackProcessingPlugin = require(\"html-webpack-processing-plugin\");\n\nconst webpackConfig = {\n  entry: \"index.js\",\n  output: {\n    path: \"dist\",\n    filename: \"index_bundle.js\",\n  },\n  plugins: [\n    new HtmlWebpackPlugin({\n      preProcessing: (originalHTML) =\u003e {\n        let newHTML = originalHTML + \"\u003cdiv\u003e\u003c/div\u003e\";\n        return newHTML;\n      },\n    }),\n    new HtmlWebpackProcessingPlugin(),\n  ],\n};\n```\n\n- add post-processor\n\n```javascript\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst HtmlWebpackProcessingPlugin = require('html-webpack-processing-plugin';)\n\nconst webpackConfig = {\n  entry: 'index.js',\n  output: {\n    path: 'dist',\n    filename: 'index_bundle.js'\n  },\n  plugins: [\n    new HtmlWebpackPlugin({\n      postProcessing: originalHTML =\u003e {\n        let newHTML = originalHTML + '\u003cdiv\u003e\u003c/div\u003e';\n        return newHTML;\n      }\n    }),\n    new HtmlWebpackProcessingPlugin()\n  ]\n};\n```\n\n## License\n\nThis project is licensed under MIT.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaoliangyu%2Fhtml-webpack-processing-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaoliangyu%2Fhtml-webpack-processing-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaoliangyu%2Fhtml-webpack-processing-plugin/lists"}