Registry / devops / webpack-partial

webpack-partial

JSON →
library2.2.0jsnpmunverified

A utility library for composing webpack configuration files using composable helper functions. Version 2.2.0 is the latest stable release (npm). The package provides curried helpers (entry, loader, output, plugin, tap) that take configuration arguments and a webpack config object, enabling clean composition via lodash/fp/compose. It normalizes entry values to arrays for consistency and supports functional patterns. Unlike ad-hoc merging or webpack-merge, it offers a functional, composable API targeted at modular webpack configs. No explicit release cadence.

npm install webpack-partial
INSTALL
IMPORT
SIG · WEBPACK-PARTIAL
W
webpack-partial
devopsjavascriptv2.2.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

entry
✓ import entry from 'webpack-partial/entry'
Default export from subpath module
loader
✓ import loader from 'webpack-partial/loader'
Default export from subpath module
output
✓ import output from 'webpack-partial/output'
Default export from subpath module
plugin
✓ import plugin from 'webpack-partial/plugin'
Default export from subpath module
tap
✓ import tap from 'webpack-partial/tap'
Default export from subpath module

Demonstrates composing a webpack config using multiple helpers: setting entry, adding a loader and plugin, modifying output, and tapping for logging.

import compose from 'lodash/fp/compose'; import entry from 'webpack-partial/entry'; import loader from 'webpack-partial/loader'; import plugin from 'webpack-partial/plugin'; import output from 'webpack-partial/output'; import tap from 'webpack-partial/tap'; import StatsPlugin from 'stats-webpack-plugin'; const config = compose( entry('src/index.js'), loader({ test: /\.js$/, use: 'babel-loader' }), plugin(new StatsPlugin()), output({ publicPath: '/build/' }), tap(config => console.log('Final config:', config)) )({ mode: 'development' }); export default config;
Debug
Known issues
gotchaEntry values are always normalized to arrays. Mixing with plain string/webpack array expectations may cause confusion.
fix
Use array operations when accessing entry values inside callbacks.
affects: >=1.0.0
gotchaFunctions are curried and expect the webpack config as the last argument. Forgetting to apply all arguments results in a partial function instead of a config.
fix
Ensure you provide all arguments or use compose to pass the config at the end.
affects: >=1.0.0
deprecatedThe package does not follow semantic versioning strictly; minor releases may include breaking changes.
fix
Pin to exact version and review changelog before upgrading.
affects: >=2.0.0
Errors
Common errors & fixes
TypeError: (0 , _entry.default) is not a function
Using non-default import or wrong import path (e.g., import { entry } from 'webpack-partial')
fix
Use default import: import entry from 'webpack-partial/entry'
Error: entry.map is not a function
Entry helper expects an array value but received an object or string directly.
fix
Wrap value in array or use the function callback form.
Upgrade
Version history
2.2.0latest on npm
Audit
Dependencies
lodashrequiredUsed internally for utility functions (partial, flow, etc.)
Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
webpack-partial — npm install webpack-partial · libregistry