{"id":16239033,"url":"https://github.com/lyfeyaj/qn-webpack","last_synced_at":"2025-07-30T18:06:25.042Z","repository":{"id":12919424,"uuid":"73138099","full_name":"lyfeyaj/qn-webpack","owner":"lyfeyaj","description":"Qiniu webpack plugin (七牛 Webpack 插件)","archived":false,"fork":false,"pushed_at":"2023-10-02T18:34:17.000Z","size":214,"stargazers_count":40,"open_issues_count":2,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-22T07:19:09.035Z","etag":null,"topics":["qiniu","qiniu-webpack-plugin","qn-webpack","webpack","webpack-plugin"],"latest_commit_sha":null,"homepage":"","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/lyfeyaj.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-08T01:45:16.000Z","updated_at":"2023-03-04T17:46:05.000Z","dependencies_parsed_at":"2024-06-21T20:28:02.882Z","dependency_job_id":null,"html_url":"https://github.com/lyfeyaj/qn-webpack","commit_stats":{"total_commits":57,"total_committers":4,"mean_commits":14.25,"dds":"0.10526315789473684","last_synced_commit":"e2a173e34369646e874ef9367260cf7fd05b772e"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/lyfeyaj/qn-webpack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyfeyaj%2Fqn-webpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyfeyaj%2Fqn-webpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyfeyaj%2Fqn-webpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyfeyaj%2Fqn-webpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyfeyaj","download_url":"https://codeload.github.com/lyfeyaj/qn-webpack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyfeyaj%2Fqn-webpack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267432930,"owners_count":24086308,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["qiniu","qiniu-webpack-plugin","qn-webpack","webpack","webpack-plugin"],"created_at":"2024-10-10T13:42:08.568Z","updated_at":"2025-07-30T18:06:24.998Z","avatar_url":"https://github.com/lyfeyaj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Qiniu Webpack Plugin\n====================\n\n\u003e 上传 Webpack Assets 至 七牛 CDN\n\n## 前提\n\n需要 Node 版本在 v4.0 以上\n\n## 安装\n\n```sh\nnpm i -D qn-webpack@2.0.3\n```\n\n## 使用方法\n\n支持的配置项:\n\n+ `accessKey` 七牛 AccessKey\n+ `secretKey` 七牛 SecretKey\n+ `bucket` 七牛存储对象名称\n+ `path` 存储路径， 默认为 `[hash]`，也可以指定 hash 长度，如: `[hash:8]`\n+ `exclude` 可选，排除特定文件，正则表达式，如: `/index\\.html$/`\n+ `include` 可选，指定要上传的文件，正则表达式，如: `/app\\.js$/`\n+ `maxRetryTimes` 可选，最大重试次数，默认 3\n+ `batch` 可选，批量上传文件并发数，默认 20\n+ `zone` 可选，存储在七牛的机房（华东 `Zone_z0`、华北 `Zone_z1`、华南 `Zone_z2`、北美 `Zone_na0`）\n\n***注: Webpack 的 `output.publicPath` 要指向七牛云（或自定义的）域名地址***\n\n```js\n// 引入\nconst QiniuPlugin = require('qn-webpack');\n\n// 配置 Plugin\nconst qiniuPlugin = new QiniuPlugin({\n  accessKey: 'my-access-key',\n  secretKey: 'my-secret-key',\n  bucket: 'my-bucket',\n  path: '[hash]/'\n});\n\n// Webpack 的配置\nmodule.exports = {\n output: {\n    // 此处为七牛提供的域名(http://7xqhak.com1.z0.glb.clouddn.com) 加上 path([hash]/)\n    publicPath: \"http://7xqhak.com1.z0.glb.clouddn.com/[hash]/\"\n    // ...\n },\n plugins: [\n   qiniuPlugin\n   // ...\n ]\n // ...\n}\n```\n\n## 效果图\n\n无图无真相 ^\\_\\^\n\n![Preview](preview.png)\n\n## License\n\n[The MIT License](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyfeyaj%2Fqn-webpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyfeyaj%2Fqn-webpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyfeyaj%2Fqn-webpack/lists"}