
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@humblebee/config-webpack4
Advanced tools
Centralized configuration for webpack v4
Install the packages from your favorite package manager
npm i -D webpack @humblebee/config-wepback4 # or yarn
This package provides a default centralised config for building web applications with webpack v4.
// webpack.config.babel.js
import path from 'path';
import { getWebpack4Configuration } from '@humblebee/config-webpack4';
// arbitrary
const BUILD_FOLDER = path.resolve(__dirname, 'dist');
const PUBLIC_FOLDER = path.resolve(__dirname, 'public');
const getWebpackConfiguration = (_env, args) => {
const { mode } = args;
switch (mode) {
case 'development':
return getWebpack4Configuration(
'development',
{
// options for the shared configuration
buildFolder: BUILD_FOLDER,
publicFolder: PUBLIC_FOLDER,
htmlTemplate: path.resolve(PUBLIC_FOLDER, 'index.html'),
// devServer: {
// // ...
// }
},
{
// options forwarded to the webpack configuration
// add whatever you need
},
);
case 'production':
return getWebpack4Configuration(
'production',
{
// options for the shared configuration
buildFolder: BUILD_FOLDER,
publicFolder: PUBLIC_FOLDER,
htmlTemplate: path.resolve(PUBLIC_FOLDER, 'index.html'),
// imageminOptions: {},
// subResourceIntegrityOptions: {},
// hashedModuleIdsOptions: {},
},
{
// options forwarded to the webpack configuration
// add whatever you need
},
);
default:
throw new Error(`Unable to provide configuration for unknown environment: "${mode}"`);
}
};
FAQs
Centralized configuration for webpack v4
We found that @humblebee/config-webpack4 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.