New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

devtools-ignore-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devtools-ignore-webpack-plugin

A Webpack plugin to ignore sourcemap in Chrome devtools

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
282
increased by190.72%
Maintainers
1
Weekly downloads
 
Created
Source

npm node npm

DevTools Ignore Webpack Plugin

A Webpack plugin to ignore-listing code in Chrome devtools. To see how ignore-listing helps your development experience, check out this offical demo. This plugin is based on the plugin implemented in Angular CLI project.

Note: This plugin is only for Webpack 5.

Installation

npm install --save-dev devtools-ignore-webpack-plugin

Usage

First, follow webpack's guide to enable source maps in your project. Please note that the "inline" source map options are not supported yet.

Then, add the plugin to your webpack config:

const DevToolsIgnorePlugin = require('devtools-ignore-webpack-plugin')

module.exports = {
  // ...,
  plugins: [
    new DevToolsIgnorePlugin()
  ]
}

Options

Currently, this plugin only supports one option: shouldIgnorePath. It is a function that checks whether a file should be ignored. The function takes a single argument, which is the path of the file. It should return a boolean value.

new DevToolsIgnorePlugin({
  shouldIgnorePath: function(path) {
    if (path.includes('my-lib')) {
      return false;
    }
    return path.includes("/node_modules/") || path.includes("/webpack/");
  }
})

When not specified, the default function is:

function defaultShouldIgnorePath(path) {
  return path.includes("/node_modules/") || path.includes("/webpack/");
}

Keywords

FAQs

Package last updated on 30 Mar 2023

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