
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
webpack-why-plugin
Advanced tools
Print out why a particular module is included in webpack bundle. 'webpack-bundle-analyzer' allows you to look at the bundle in detail, but it doesn't tell you why a module is included in the bundle.
Example output:
warning is bundled because:
warning <= formik
: src/my-page.tsx
warning <= @material-ui/core <= @material-ui/icons
warning <= jss-nested <= @material-ui/core <= @material-ui/icons
warning <= jss <= @material-ui/core <= @material-ui/icons
warning <= jss <= jss-global <= @material-ui/core <= @material-ui/icons
: src/my-page-2.tsx
First add the module:
# yarn add -D webpack-why-plugin
# npm i --dev webpack-why-plugin
In "webpack.config.js", add these lines:
import { WebpackWhyPlugin } from "webpack-why-plugin";
module.exports = async function main(env, arg) {
let config = {
entry:{
// ...
},
plugins: [
]
// ...
}
if (arg.why) {
config.plugins.push(new WebpackWhyPlugin({names: arg.why}));
}
return config;
}
From command line, run
# npx webpack --why m3
m3 is bundled because:
m3 <= m1 <= m2
: src/page1.tsx
: src/page2.tsx
The output says the src/page1.tsx and src/page2.tsx imported module "m2", "m2" imported "m1", "m1" imported "m3", thus "m3" is in the bundle.
To explain multiple modules, delaminate by comma:
# npx webpack --why m3,m4
To match module names by regex, surround with //
# npx webpack --why /material/
FAQs
webpack-why-plugin -----------------------------------
The npm package webpack-why-plugin receives a total of 10 weekly downloads. As such, webpack-why-plugin popularity was classified as not popular.
We found that webpack-why-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.