{"id":18290529,"url":"https://github.com/react-doc/raw-content-replace-loader","last_synced_at":"2025-04-09T07:28:35.351Z","repository":{"id":71661220,"uuid":"116423513","full_name":"react-doc/raw-content-replace-loader","owner":"react-doc","description":"Replaces the specified path file contents.","archived":false,"fork":false,"pushed_at":"2018-01-05T20:50:39.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T18:53:21.684Z","etag":null,"topics":["rdoc","react-doc","webpack","webpack-loader"],"latest_commit_sha":null,"homepage":"","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/react-doc.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-05T20:21:51.000Z","updated_at":"2018-05-04T11:32:59.000Z","dependencies_parsed_at":"2023-05-03T08:03:55.086Z","dependency_job_id":null,"html_url":"https://github.com/react-doc/raw-content-replace-loader","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/react-doc%2Fraw-content-replace-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-doc%2Fraw-content-replace-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-doc%2Fraw-content-replace-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-doc%2Fraw-content-replace-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-doc","download_url":"https://codeload.github.com/react-doc/raw-content-replace-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247997734,"owners_count":21030673,"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":["rdoc","react-doc","webpack","webpack-loader"],"created_at":"2024-11-05T14:11:21.226Z","updated_at":"2025-04-09T07:28:35.332Z","avatar_url":"https://github.com/react-doc.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"200\" height=\"200\"\n    src=\"https://cdn3.iconfinder.com/data/icons/lexter-flat-colorfull-file-formats/56/raw-256.png\"\u003e\n  \u003ca href=\"https://github.com/webpack/webpack\"\u003e\n    \u003cimg width=\"200\" height=\"200\"\n      src=\"https://webpack.js.org/assets/icon-square-big.svg\"\u003e\n  \u003c/a\u003e\n  \u003ch1\u003eRaw Content Replace Loader\u003c/h1\u003e\n  \u003cp\u003eReplaces the specified path file contents.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003ch2 align=\"center\"\u003eInstall\u003c/h2\u003e\n\n```bash\nnpm install --save-dev raw-content-replace-loader\n```\n\n\u003ch2 align=\"center\"\u003eUsage\u003c/h2\u003e\n\nUse the loader either via your webpack config, CLI or inline.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.md$/,\n        use: [\n          {\n            loader: require.resolve('raw-content-replace-loader'),\n            options: {\n              // include: /rdoc\\.tree\\.data\\.json$/, // 检查包含的文件名字\n              // extensions: /\\.md/,\n              path: PATH.join(cachePath, './md'), // 需要替换的目录\n              replace: cmd.projectRoot, // 替换成目标目录\n              sep: /___/g,               // 文件名存储，文件夹+下划线间隔+文件名\n            }\n          }\n        ]\n      }\n    ]\n  }\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-doc%2Fraw-content-replace-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-doc%2Fraw-content-replace-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-doc%2Fraw-content-replace-loader/lists"}