Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webpack-dep-finder

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-dep-finder

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.

  • 1.0.6
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

GitHub Actions Workflow Status NPM Version NPM Downloads npm package minimized gzipped size

Webpack Dep Finder

A fast and efficient tool for finding the issuer path to a specific dependency in your Webpack bundles.

Install

# NPM
npm install --save-dev webpack-dep-finder
# Yarn
yarn add -D webpack-dep-finder

Usage

As a Webpack Plugin

const WebpackDepFinder = require("webpack-dep-finder");

new WebpackDepFinder({
    dependencyPattern: /your-regex-pattern/,
    bail: true // Optional: defaults to true
});

As a CLI Utility

You can also use webpack-dep-finder as a CLI tool:

npx webpack-dep-finder --dependency-pattern /your-regex-pattern/ --config path/to/webpack.config.js

CLI 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)
-c, --config <path>                 Path to the Webpack configuration file. (Required)
-V, --version                       Output the version number.
-h, --help                          Output usage information.

Example Output

Found target dependency: /path/to/your/dependency.js
/path/to/your/entry-file.js
  /path/to/another/dependency.js
    /path/to/your/dependency.js

This output shows the path from the entry file to the target dependency.

Troubleshooting

Why is webpack-dep-finder so fast?

webpack-dep-finder is designed for speed by stopping the search as soon as the specified dependency is found during the Webpack compilation process. This approach contrasts with tools that analyze the entire bundle, making dep-finder a quicker option for targeted searches.

What happens if the dependency is not found?

If the specified dependency isn't found, webpack-dep-finder will 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.

Other Tools

  • Statoscope - A more comprehensive Webpack bundle analysis tool with additional features like interactive treemaps.

Maintainers


puj

Contributing

We welcome contributions to Webpack Dep Finder! Please see CONTRIBUTING.md for more details.

Keywords

FAQs

Package last updated on 02 Sep 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc