{"id":16198702,"url":"https://github.com/ali322/content-replace-webpack-plugin","last_synced_at":"2025-03-19T05:30:38.693Z","repository":{"id":52139542,"uuid":"117073922","full_name":"ali322/content-replace-webpack-plugin","owner":"ali322","description":"simple and efficient Webpack plugin that replace assets content when webpack emit files","archived":false,"fork":false,"pushed_at":"2023-01-04T01:05:07.000Z","size":203,"stargazers_count":8,"open_issues_count":6,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-28T16:01:05.296Z","etag":null,"topics":["webpack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ali322.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-11T08:47:15.000Z","updated_at":"2023-08-02T20:46:43.000Z","dependencies_parsed_at":"2023-02-01T17:02:21.836Z","dependency_job_id":null,"html_url":"https://github.com/ali322/content-replace-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/ali322%2Fcontent-replace-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali322%2Fcontent-replace-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali322%2Fcontent-replace-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali322%2Fcontent-replace-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ali322","download_url":"https://codeload.github.com/ali322/content-replace-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971172,"owners_count":20376784,"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":["webpack"],"created_at":"2024-10-10T09:14:39.772Z","updated_at":"2025-03-19T05:30:38.401Z","avatar_url":"https://github.com/ali322.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"content-replace-webpack-plugin [![Build Status](https://travis-ci.org/ali322/content-replace-webpack-plugin.svg?branch=master)](https://travis-ci.org/ali322/content-replace-webpack-plugin) [![npm version](https://badge.fury.io/js/content-replace-webpack-plugin.svg)](https://badge.fury.io/js/content-replace-webpack-plugin)\n===\n[![NPM](https://nodei.co/npm/content-replace-webpack-plugin.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/content-replace-webpack-plugin/)\n\nsimple and efficient plugin that replace assets content when webpack emit files\n\nInstall\n===\n\n```javascript\nnpm install content-replace-webpack-plugin --save--dev\n```\n\nUsage\n===\n\nadd plugin in your webpack.config.js\n\n```javascript\nvar ContentReplacePlugin = require('content-replace-webpack-plugin')\n\nmodule.exports = {\n    entry:{\n        index:\"./index.js\"\n    },\n    module:{\n        loaders:[\n            ...\n        ]\n    },\n    output:{\n        path:'./dist',\n        filename:'[name].min.js'\n    },\n    plugins:[\n        new ContentReplacePlugin({\n          external: ['path/to/other/file'], // other files which not in webpack assets\n          chunks: ['index'],\n          rules: {\n            '.js': content =\u003e content.replace('/foo', '/bar')\n          }\n        })\n    ]\n}\n```\n\nPlugin Options\n===\n\n- **external**: other files which not in webpack assets\n- **rules**: replace rules, accept object which key is file extname and value is replace function\n- **chunks**: only these chunks's files will be replaced, default value is all\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali322%2Fcontent-replace-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fali322%2Fcontent-replace-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali322%2Fcontent-replace-webpack-plugin/lists"}