{"id":28302049,"url":"https://github.com/bootstarted/webpack-partial","last_synced_at":"2026-03-06T02:07:15.408Z","repository":{"id":36687924,"uuid":"40994404","full_name":"bootstarted/webpack-partial","owner":"bootstarted","description":"Partial webpack configuration.","archived":false,"fork":false,"pushed_at":"2018-01-13T05:50:21.000Z","size":93,"stargazers_count":35,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-29T07:13:52.895Z","etag":null,"topics":["bootstart","webpack-configuration"],"latest_commit_sha":null,"homepage":null,"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/bootstarted.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2015-08-18T19:54:06.000Z","updated_at":"2020-05-04T09:08:56.000Z","dependencies_parsed_at":"2022-09-12T20:50:34.795Z","dependency_job_id":null,"html_url":"https://github.com/bootstarted/webpack-partial","commit_stats":null,"previous_names":["izaakschroeder/webpack-partial"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bootstarted/webpack-partial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootstarted%2Fwebpack-partial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootstarted%2Fwebpack-partial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootstarted%2Fwebpack-partial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootstarted%2Fwebpack-partial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bootstarted","download_url":"https://codeload.github.com/bootstarted/webpack-partial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bootstarted%2Fwebpack-partial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30158940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"online","status_checked_at":"2026-03-06T02:00:08.268Z","response_time":250,"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":["bootstart","webpack-configuration"],"created_at":"2025-05-23T20:13:35.230Z","updated_at":"2026-03-06T02:07:15.394Z","avatar_url":"https://github.com/bootstarted.png","language":"JavaScript","readme":"# webpack-partial\n\nIntelligently compose [webpack] configuration files.\n\n![build status](http://img.shields.io/travis/webpack-config/webpack-partial/master.svg?style=flat)\n![coverage](http://img.shields.io/coveralls/webpack-config/webpack-partial/master.svg?style=flat)\n![license](http://img.shields.io/npm/l/webpack-partial.svg?style=flat)\n![version](http://img.shields.io/npm/v/webpack-partial.svg?style=flat)\n![downloads](http://img.shields.io/npm/dm/webpack-partial.svg?style=flat)\n\n\n## Usage\n\n```sh\nnpm install --save webpack-partial\n```\n\nMaking [webpack] configurations composable is tricky. So we provide several helpers to ease the composition process. Each helper is of the form `(arg1, arg2, ..., webpackConfig)`. All functions are curried and the last argument is always a webpack configuration object allowing you to chain helpers together easily with `compose` (or `flow`).\n\nGenerally:\n\n```javascript\nimport compose from 'lodash/fp/compose';\nimport plugin from 'webpack-partial/plugin';\nimport StatsWebpackPlugin from 'stats-webpack-plugin';\nimport ExtractTextWebpackPlugin from 'extract-text-webpack-plugin';\n\nconst buildConfig = compose(\n  plugin(new StatsWebpackPlugin()),\n  plugin(new ExtractTextWebpackPlugin())\n);\n\nconst config = buildConfig({/* webpack config here */});\n```\n\nBut you can also use them individually if you need to:\n\n```javascript\nimport plugin from 'webpack-partial/plugin';\nimport StatsWebpackPlugin from 'stats-webpack-plugin';\n\nconst config = plugin(new StatsWebpackPlugin(), {/* webpack config here */});\n```\n\nThe available helpers are:\n\n * entry\n * loader\n * output\n * plugin\n * tap\n\n### entry(values, config)\n\nModify the webpack config `entry` object.\n\n```javascript\n// Set the `entry` to `index.js`\nentry('index.js');\n\n// Append `foo.js` to all existing entrypoints.\nentry.append('foo.js');\nentry((previous) =\u003e [...previous, 'foo.js'])\n```\n\nThe `entry` function takes either a value to add to entry _or_ a function that maps the existing entry values to new ones. The values property is _always_ an array for consistency even though internally webpack can use objects, strings or arrays.\n\nThe callback has this signature:\n\n```javascript\n(previous: Array, key: ?String, config: Object) =\u003e { ... }\n```\n\nThe `key` property represents the key in object-style entrypoints and `config` is the existing webpack configuration object.\n\n### loader(loader, config)\n\nAdd a loader configuration to an existing webpack configuration.\n\n```javascript\nimport loader from 'webpack-partial/loader';\n\nconst babel = loader({\n  test: /\\.js$/,\n  loader: 'babel-loader',\n})\nbabel(webpackConfig);\n```\n\n### output(object, config)\n\nMerge the given output options into the output options in a webpack configuration. You can use it to do things like quickly change the `publicPath`.\n\n```javascript\nimport output from 'webpack-partial/output';\nconst rebase = output({publicPath: '/somewhere'});\nrebase(webpackConfig);\n```\n\n### plugin(object, config)\n\nAppend a plugin to the existing plugins in a webpack configuration.\n\n```javascript\nimport plugin from 'webpack-partial/plugin';\nimport StatsWebpackPlugin from 'stats-webpack-plugin';\n\nconst stats = plugin(new StatsWebpackPlugin())\nstats(webpackConfig);\n```\n\n### tap(func, config)\n\nObserve the configuration but ignore any modifications. Can be useful to do things like dumping out a configuration.\n\n```javascript\nimport tap from 'webpack-partial/tap';\nconst debug = tap((config) =\u003e console.log(config));\ndebug(webpackConfig);\n```\n\n[webpack]: http://webpack.github.io/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbootstarted%2Fwebpack-partial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbootstarted%2Fwebpack-partial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbootstarted%2Fwebpack-partial/lists"}