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

@rushstack/webpack-plugin-utilities

Package Overview
Dependencies
Maintainers
3
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rushstack/webpack-plugin-utilities

This plugin sets the webpack public path at runtime.

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
increased by11.66%
Maintainers
3
Weekly downloads
 
Created
Source

webpack-plugin-utilities

Installation

npm install @rushstack/webpack-plugin-utilities --save

Overview

This is a collection of utilities for writing webpack plugins

Usage

import { VersionDetection } from "@rushstack/webpack-plugin-utilities"

class MyExampleWebpackPlugin {
  constructor() {
    this.pluginName = "MyExampleWebpackPlugin"
  }

  apply(compiler) {
    if (VersionDetection.isWebpack3OrEarlier(compiler)) {
      throw new Error(`This plugin does not support webpack 3 or below.`)
    }

    const isWebpack4 = VersionDetection.isWebpack4(compiler);

    if (isWebpack4) {
      compiler.hooks.compilation.tap(this.pluginName, (compilation) => {
        // ....
      });
    } else {
      compiler.hooks.compilation.tap(this.pluginName, (compilation) => {
        // ...
      });
    }
  }
}
  • CHANGELOG.md - Find out what's new in the latest version

@rushstack/webpack-plugin-utilities is part of the Rush Stack family of projects.

FAQs

Package last updated on 10 May 2022

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