🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@bigmogician/webpack-warning-plugin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bigmogician/webpack-warning-plugin

a filter of webpack output warnings.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

webpack-warning-plugin

a filter of webpack output warnings.

environment

  • webpack@^4.4.0
  • typescript@^3.4.5

install

#use yarn
yarn add @bigmogician/webpack-warning-plugin -D
#use npm
npm install @bigmogician/webpack-warning-plugin --save-dev

usage

default example

webpack.config.js

const { WarningPlugin } = require("@bigmogician/webpack-warning-plugin");

module.exports = {
  plugins: [
    new WarningPlugin();
  ]
};

use match expression to filter warnings

  • default: []

webpack.config.js

const { WarningPlugin } = require("@bigmogician/webpack-warning-plugin");

module.exports = {
  plugins: [
    new WarningPlugin({
      rules: {
        global: {
          match: [
            "not found",
            /^module .*/gi,
            (warning) => warning.error.message.length === 3
          ]
        }
      }
    });
  ]
};

use your custom tsconfig.json

  • default: "tsconfig.json"

webpack.config.js

const { WarningPlugin } = require("@bigmogician/webpack-warning-plugin");

module.exports = {
  plugins: [
    new WarningPlugin({
      options: {
        tsconfig: "tsconfig.custom.json"
      }
    });
  ]
};

close the ignore filter for "vue exports not found" warnings

  • default: false

webpack.config.js

const { WarningPlugin } = require("@bigmogician/webpack-warning-plugin");

module.exports = {
  plugins: [
    new WarningPlugin({
      rules: {
        vue: {
          ignoreModuleExportNotFoundForTs: true
        }
      }
    });
  ]
};

FAQs

Package last updated on 24 Jun 2019

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