{"id":23392838,"url":"https://github.com/leegeunhyeok/inject-assets-list-webpack-plugin","last_synced_at":"2026-04-20T04:03:07.547Z","repository":{"id":57273966,"uuid":"311220814","full_name":"leegeunhyeok/inject-assets-list-webpack-plugin","owner":"leegeunhyeok","description":"Inject webpack assets list into your HTML template","archived":false,"fork":false,"pushed_at":"2020-11-09T08:52:00.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-03T16:56:44.416Z","etag":null,"topics":["assets","webpack","webpack-plugin"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/inject-assets-list-webpack-plugin","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/leegeunhyeok.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":"2020-11-09T04:12:05.000Z","updated_at":"2021-01-06T04:47:38.000Z","dependencies_parsed_at":"2022-09-17T10:12:43.719Z","dependency_job_id":null,"html_url":"https://github.com/leegeunhyeok/inject-assets-list-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/leegeunhyeok/inject-assets-list-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Finject-assets-list-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Finject-assets-list-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Finject-assets-list-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Finject-assets-list-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leegeunhyeok","download_url":"https://codeload.github.com/leegeunhyeok/inject-assets-list-webpack-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Finject-assets-list-webpack-plugin/sbom","scorecard":{"id":582640,"data":{"date":"2025-08-11","repo":{"name":"github.com/leegeunhyeok/inject-assets-list-webpack-plugin","commit":"7582f040d2ec7f8c8382f427fed6548c82d2514b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"16 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T19:35:07.355Z","repository_id":57273966,"created_at":"2025-08-20T19:35:07.355Z","updated_at":"2025-08-20T19:35:07.355Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32032305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["assets","webpack","webpack-plugin"],"created_at":"2024-12-22T05:16:28.360Z","updated_at":"2026-04-20T04:03:07.503Z","avatar_url":"https://github.com/leegeunhyeok.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm][npm]][npm-url]\n[![node][node]][node-url]\n![npm](https://img.shields.io/npm/dw/inject-assets-list-webpack-plugin.svg)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/webpack/webpack\"\u003e\n    \u003cimg width=\"200\" src=\"https://webpack.js.org/assets/icon-square-big.svg\"\u003e\n  \u003c/a\u003e\n  \u003ch1\u003eInject Assets List Webpack Plugin\u003c/h1\u003e\n  \u003cp\u003eInject assets list into your HTML template\u003c/p\u003e\n\u003c/div\u003e\n\n## Install\n\n- This Plugin dependent on [HtmlWebpackPlugin](https://github.com/jantimon/html-webpack-plugin)\n\n```bash\n  npm i --save-dev inject-assets-list-webpack-plugin\n```\n\n```bash\n  yarn add --dev inject-assets-list-webpack-plugin\n```\n\n## Usage\n\nThe plugin will generate an JS array for you that includes all your `webpack`\nassets(RawSource) in the `\u003chead\u003e` using `\u003cscript\u003e` tags. Just add the plugin to your `webpack`\nconfig as follows:\n\n**webpack.config.js**\n\n```js\n// !! HtmlWebpackPlugin required\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst InjectAssetsListWebpackPlugin = require('inject-assets-list-webpack-plugin');\n\nmodule.exports = {\n  entry: 'index.js',\n  publicPath: '/',\n  output: {\n    path: __dirname + '/dist',\n    filename: 'bundle.js',\n  },\n  plugins: [new HtmlWebpackPlugin(), new InjectAssetsListWebpackPlugin()],\n};\n```\n\nThis will generate a file `dist/index.html` containing the following\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003ctitle\u003eWebpack App\u003c/title\u003e\n    \u003cscript type=\"text/javascript\"\u003e\n      var __assets = [\n        '/img/apple.707709ec.png',\n        '/img/banana.51a48343.png',\n        /* Webpack assets */\n      ];\n    \u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cscript src=\"bundle.js\"\u003e\u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nAssets list value format: `\u003cpublicPath\u003ename.ext` (eg. /img/banana.51a48343.png)\n\n## Options\n\nYou can pass a hash of configuration options to `inject-assets-list-webpack-plugin`.\nAllowed values are as follows:\n\n|        Name         |    Type    |  Default   | Description                              |\n| :-----------------: | :--------: | :--------: | :--------------------------------------- |\n|     **`name`**      | `{String}` | `__assets` | The name to use for the global variable  |\n| **`allowPattern`**  | `{RegExp}` | undefined  | Regular expression for allow assets name |\n| **`ignorePattern`** | `{RegExp}` | undefined  | Regular expression for ignoring assets   |\n\nHere's an example webpack config illustrating how to use these options\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  entry: 'index.js',\n  publicPath: '/',\n  output: {\n    path: __dirname + '/dist',\n    filename: 'index.js',\n  },\n  plugins: [\n    new HtmlWebpackPlugin(),\n    new InjectAssetsListWebpackPlugin({\n      name: 'myAssets',\n      allowPattern: /(png|jpg)/, // Allow `png`, `jpg`\n      ignorePattern: /(gif|ttf)/, // ignoring `gif`, `ttf` files\n    }),\n  ],\n};\n```\n\n**Sample assets**\n\n```\nassets\n  ├─ img\n  │   ├── apple.png\n  │   ├── animation.gif\n  │   └── banana.png\n  │\n  ├─ font\n  │   └── my-font.ttf\n  │\n  └─ content\n      ├── post_1.jpg\n      ├── post_2.jpg\n      └── post_3.jpg\n```\n\n**Result**\n\n```js\n// in \u003cscript\u003e\nvar myAssets = [\n  '/img/apple.707709ec.png',\n  '/img/banana.51a48343.png',\n  '/content/post_1.6b60786f.jpg',\n  '/content/post_2.26053162.jpg',\n  '/content/post_3.a416371c.jpg',\n];\n```\n\nYou can uses assets list list like this.\n\n```js\nfunction preload() {\n  Promise.allSettled(myAssets.map((uri) =\u003e fetch(uri))).then(() =\u003e {\n    console.log(`${myAssets.length} resource(s) loaded.`);\n  });\n}\n\npreload(); // 5 resource(s) loaded.\n```\n\n## Development\n\n```bash\n# Install dependencies\nnpm i\n\n# Build module\nnpm run build\n```\n\n## Changelog\n\n- `1.0.3` (2020.11.09)\n  - Remove `RawSource` filtering logic\n- `1.0.2` (2020.11.09)\n  - FIXED: Combine default options at initialization\n  - Update README.md\n- `1.0.1` (2020.11.09)\n  - Add `allowPattern` option\n  - Change `name` property to optional\n- `1.0.0` (2020.11.09)\n  - First Release!\n\n## Contributors\n\nThis project exists thanks to all the people who contribute.\n\nYou're free to contribute to this project by submitting [issues](https://github.com/jantimon/inject-assets-list-webpack-plugin/issues) and/or [pull requests](https://github.com/jantimon/inject-assets-list-webpack-plugin/pulls).\n\n[npm]: https://img.shields.io/npm/v/inject-assets-list-webpack-plugin.svg\n[npm-url]: https://npmjs.com/package/inject-assets-list-webpack-plugin\n[node]: https://img.shields.io/node/v/inject-assets-list-webpack-plugin.svg\n[node-url]: https://nodejs.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleegeunhyeok%2Finject-assets-list-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleegeunhyeok%2Finject-assets-list-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleegeunhyeok%2Finject-assets-list-webpack-plugin/lists"}