{"id":29926654,"url":"https://github.com/ecomfe/webpack-auto-cdn-plugin","last_synced_at":"2025-08-02T12:43:02.101Z","repository":{"id":35790806,"uuid":"200785990","full_name":"ecomfe/webpack-auto-cdn-plugin","owner":"ecomfe","description":"Webpack plugin to automatically extract dependencies and reference them via CDN","archived":false,"fork":false,"pushed_at":"2023-01-07T08:27:42.000Z","size":3628,"stargazers_count":10,"open_issues_count":36,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-25T08:05:23.157Z","etag":null,"topics":[],"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/ecomfe.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":"2019-08-06T05:58:42.000Z","updated_at":"2021-01-26T12:22:13.000Z","dependencies_parsed_at":"2023-01-16T06:45:45.567Z","dependency_job_id":null,"html_url":"https://github.com/ecomfe/webpack-auto-cdn-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ecomfe/webpack-auto-cdn-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fwebpack-auto-cdn-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fwebpack-auto-cdn-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fwebpack-auto-cdn-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fwebpack-auto-cdn-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecomfe","download_url":"https://codeload.github.com/ecomfe/webpack-auto-cdn-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fwebpack-auto-cdn-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268392180,"owners_count":24243297,"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-08-02T02:00:12.353Z","response_time":74,"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":[],"created_at":"2025-08-02T12:42:26.498Z","updated_at":"2025-08-02T12:43:02.076Z","avatar_url":"https://github.com/ecomfe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-auto-cdn-plugin\n\nWebpack plugin to automatically extract dependencies and reference them via CDN.\n\nThis plugin will scan your `dependencies` and `devDependencies`, extract those suitable to be hosted on CDN via [lib/hints.js](lib/hints.js) and add them to `externals`, a `\u003cscript\u003e` tag will be added to your `html-webpack-plugin` generated HTML file so that these dependencies can be referenced via CDN.\n\n## Usage\n\nThis plugin requires `html-webpack-plugin@4.x` to work.\n\n```javascript\n// webpack.config.js\nconst path = require('path');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst AutoCDNPlugin = require('../index');\n\nmodule.exports = {\n    mode: 'development',\n    context: __dirname,\n    entry: path.join(__dirname, 'index.js'),\n    output: {\n        path: path.join(__dirname, 'dist'),\n    },\n    plugins: [\n        new HtmlWebpackPlugin(),\n        new AutoCDNPlugin({cwd: __dirname}),\n    ],\n};\n```\n\n### Options\n\n- `{string} cwd`: Current working directory where `package.json` of your project is.\n\n## Play It\n\n```shell\ncd demo\nyarn install\nwebpack --config=webpack.config.js\n```\n\nHave a look at `dist/index.html` and `dist/main.js`, all dependencies are removed from dist javascript, `\u003cscript\u003e` tags are generated automatically.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecomfe%2Fwebpack-auto-cdn-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecomfe%2Fwebpack-auto-cdn-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecomfe%2Fwebpack-auto-cdn-plugin/lists"}