{"id":15854344,"url":"https://github.com/afeiship/file-callback-webpack-plugin","last_synced_at":"2026-04-30T00:07:51.840Z","repository":{"id":96087612,"uuid":"54629348","full_name":"afeiship/file-callback-webpack-plugin","owner":"afeiship","description":"File callback webpack plugin.","archived":false,"fork":false,"pushed_at":"2023-08-16T14:04:35.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-22T22:09:48.156Z","etag":null,"topics":["callback","file","webpack","webpack5"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/afeiship.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2016-03-24T09:13:12.000Z","updated_at":"2023-08-14T03:21:30.000Z","dependencies_parsed_at":"2024-12-14T12:21:50.418Z","dependency_job_id":null,"html_url":"https://github.com/afeiship/file-callback-webpack-plugin","commit_stats":null,"previous_names":["afeiship/file-callback-webpack-plugin"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/afeiship/file-callback-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Ffile-callback-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Ffile-callback-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Ffile-callback-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Ffile-callback-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/file-callback-webpack-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Ffile-callback-webpack-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32448894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"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":["callback","file","webpack","webpack5"],"created_at":"2024-10-05T19:41:36.837Z","updated_at":"2026-04-30T00:07:51.813Z","avatar_url":"https://github.com/afeiship.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# file-callback-webpack-plugin\n\u003e File callback webpack plugin.\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```shell\nnpm install @jswork/file-callback-webpack-plugin\n```\n\n## usage\n```js\nconst { defineConfig } = require('@vue/cli-service');\nconst FileCbPlugin = require('@jswork/file-callback-webpack-plugin');\nconst { envname } = require('@jswork/ci-kits');\nconst ENVS = require('./.env-cmdrc');\nconst currentEnvs = ENVS[envname()];\n\n// usage\nconst manifestReplace = new FileCbPlugin({\n  path: 'src/manifest.json',\n  callback: (content) =\u003e {\n    nx.set(\n      content,\n      'mp-weixin.appid',\n      JSON.parse(currentEnvs['VUE_APP_APP_ID'])\n    );\n    return content;\n  }\n});\n\nmodule.exports = defineConfig({\n  configureWebpack: (config) =\u003e {\n    const plugins = config.plugins;\n    config.devtool = 'source-map';\n    config.plugins = [...plugins, manifestReplace];\n  }\n});\n```\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/file-callback-webpack-plugin/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/file-callback-webpack-plugin\n[version-url]: https://npmjs.org/package/@jswork/file-callback-webpack-plugin\n\n[license-image]: https://img.shields.io/npm/l/@jswork/file-callback-webpack-plugin\n[license-url]: https://github.com/afeiship/file-callback-webpack-plugin/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/file-callback-webpack-plugin\n[size-url]: https://github.com/afeiship/file-callback-webpack-plugin/blob/master/dist/file-callback-webpack-plugin.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/file-callback-webpack-plugin\n[download-url]: https://www.npmjs.com/package/@jswork/file-callback-webpack-plugin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Ffile-callback-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Ffile-callback-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Ffile-callback-webpack-plugin/lists"}