Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
webpack-dep-finder
Advanced tools
A Webpack plugin and CLI tool to find dependencies in your project's modules using regex patterns. Efficiently locate and manage module dependencies with customizable search options.
Fast and efficient tool for finding the issuer path to a specific dependency in your Webpack bundles.
# NPM
npm install --save-dev webpack-dep-finder
# Yarn
yarn add -D webpack-dep-finder
new WebpackDepFinder({
dependencyPattern: /your-regex-pattern/,
bail: true // Optional: defaults to true
});
This module will help you:
new WebpackDepFinder(options?: object)
Name | Type | Description |
---|---|---|
dependency | {RegExp} | Required. The regex pattern to match the resource path/filename of the dependency you want to locate in your bundles.. |
bail | {Boolean} | Default: true . Determines if the search should stop as soon as the dependency is found. |
You can also use webpack-dep-finder
as a CLI tool if you install it globally
webpack-dep-finder --dependency-pattern /your-regex-pattern/
The command will output the dependency path:
Found target dependency: /home/van/Pgammin/webpack-dep-finder/src/deps/c.js
/home/van/Pgammin/webpack-dep-finder/src/index.js
/home/van/Pgammin/webpack-dep-finder/src/deps/a.js
/home/van/Pgammin/webpack-dep-finder/src/deps/b.js
/home/van/Pgammin/webpack-dep-finder/src/deps/c.js
This shows the path from the entry file to the target dependency.
-d, --dependency-pattern <pattern> Regex pattern to match the resource path/filename to locate. (Required)
Arguments are documented below:
bundleStatsFile
Path to the Webpack stats JSON file.
options
-d, --dependency-pattern <pattern> Regex pattern to match the resource path/filename to locate. (Required)
-b, --bail Stop searching as soon as the dependency is found. (Default: true)
-V, --version Output the version number.
-h, --help Output usage information.
webpack-dep-finder
so fast?webpack-dep-finder
is designed to be extremely fast by stopping the search as soon as the specified dependency is located during the Webpack compilation process. This contrasts with other tools that might analyze the entire bundle, making dep-finder
a much quicker option for targeted searches.
If the specified dependency is not found, webpack-dep-finder will simply complete the entire build process without performing any additional analysis. Ensure that the dependency name is correct and that it is included in your Webpack build.
puj |
We welcome contributions to Webpack Dep Finder! Please see CONTRIBUTING.md for more details.
Check out CONTRIBUTING.md for instructions on contributing 🎉
FAQs
A Webpack plugin and CLI tool for efficiently pinpointing and analyzing dependencies in your Webpack bundles using regex. Ideal for optimizing and streamlining the build process during iterative development, helping to detangle complex dependency trees qu
We found that webpack-dep-finder demonstrated a healthy version release cadence and project activity because the last version was released less than 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.