{"id":16346451,"url":"https://github.com/hxlniada/webpack-concat-plugin","last_synced_at":"2025-04-04T17:06:05.630Z","repository":{"id":21913055,"uuid":"94415978","full_name":"hxlniada/webpack-concat-plugin","owner":"hxlniada","description":"a plugin to help webpack to concat file and inject to html","archived":false,"fork":false,"pushed_at":"2022-03-25T18:09:09.000Z","size":614,"stargazers_count":97,"open_issues_count":30,"forks_count":53,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-12T00:35:22.911Z","etag":null,"topics":["concat","concatenation","legacy","webpack"],"latest_commit_sha":null,"homepage":"https://github.com/hxlniada/webpack-concat-plugin","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/hxlniada.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-15T08:08:56.000Z","updated_at":"2024-03-05T11:52:48.000Z","dependencies_parsed_at":"2022-08-07T10:01:19.409Z","dependency_job_id":null,"html_url":"https://github.com/hxlniada/webpack-concat-plugin","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxlniada%2Fwebpack-concat-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxlniada%2Fwebpack-concat-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxlniada%2Fwebpack-concat-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxlniada%2Fwebpack-concat-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hxlniada","download_url":"https://codeload.github.com/hxlniada/webpack-concat-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217175,"owners_count":20903009,"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":["concat","concatenation","legacy","webpack"],"created_at":"2024-10-11T00:35:22.942Z","updated_at":"2025-04-04T17:06:05.613Z","avatar_url":"https://github.com/hxlniada.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-concat-plugin\n\n[![Build Status](https://img.shields.io/travis/hxlniada/webpack-concat-plugin.svg)](https://travis-ci.org/hxlniada/webpack-concat-plugin)\n[![npm package](https://img.shields.io/npm/v/webpack-concat-plugin.svg)](https://www.npmjs.org/package/webpack-concat-plugin)\n[![npm downloads](http://img.shields.io/npm/dm/webpack-concat-plugin.svg)](https://www.npmjs.org/package/webpack-concat-plugin)\n\n\u003e A plugin to help webpack concat js and inject into html\n\n### Why\n\nWebpack is really powerful. However, when I want to concat the static files and inject into html without webpack JSONP code wrapper, it seems impossible to do that without other tool's help.\n\n### Install\n\n```\nnpm install webpack-concat-plugin --save-dev\n```\nfor webpack \u003e= 4.0\n```\nnpm install webpack-concat-plugin@3.0.0 --save-dev\n```\n\n### Features\n\n- Concat\n- Inject to html(with html-webpack-plugin)\n\n### Usage\n\n```javascript\nconst ConcatPlugin = require('webpack-concat-plugin');\n\nnew ConcatPlugin({\n    ...see options\n    // examples\n    uglify: false,\n    sourceMap: false,\n    name: 'result',\n    outputPath: 'path/to/output/',\n    fileName: '[name].[hash:8].js',\n    filesToConcat: ['jquery', './src/lib/**', './dep/dep.js', ['./some/**', '!./some/excludes/**']],\n    attributes: {\n        async: true\n    }\n});\n\n```\n\n### Options\n\n#### uglify [boolean | object] default: false\nif true the output file will be uglified\n\nor set [uglifyjs](https://github.com/mishoo/UglifyJS2) options to customize the output\n\n#### sourceMap [boolean] default: false\nif true, will output sourcemap\n\n#### name [string] default: \"result\"\nit's useful when you want to inject to html-webpack-plugin manully\n\n#### publicPath [string|boolean] default: webpack's publicPath\nif set, will be used as the public path of the script tag.\n\nif set to false, will use relativePath.\n\n#### outputPath [string]\nif set, will be used as the output directory of the file.\n\n#### fileName [string] default: [name].js\nif set, will be used as the output fileName\n\n#### filesToConcat [array] *required*\nsupported path patterns:\n* normal path\n* npm packages\n* [glob](https://github.com/sindresorhus/globby)\n\n#### injectType [\"prepend\"|\"append\"|\"none\"] default: \"prepend\"\nhow to auto inject to html-webpack-plugin(only if html-webpack-plugin set inject option not to be false)\n\n#### attributes [object]\nif set, will be used as the extra attributes of the script tag.\n\n### Examples\n#### Inject to html by hand\n\n```\ndoctype html\n...\n    script(src=htmlWebpackPlugin.files.webpackConcat.flexible)\n...\n```\n\n### TODO\n\n- [ ] add css support\n- [x] auto inject to html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhxlniada%2Fwebpack-concat-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhxlniada%2Fwebpack-concat-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhxlniada%2Fwebpack-concat-plugin/lists"}