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

null-loader

Package Overview
Dependencies
Maintainers
8
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

null-loader

A webpack loader that returns an empty module.

4.0.1
latest
Source
npm
Version published
Weekly downloads
713K
-19.75%
Maintainers
8
Weekly downloads
 
Created

What is null-loader?

The null-loader npm package is a webpack loader that returns an empty module. It is useful for ignoring specific files or modules during the build process, effectively making them 'null' or non-existent in the final bundle.

What are null-loader's main functionalities?

Ignore specific files

This feature allows you to ignore all JavaScript files in your project. The null-loader will replace the content of these files with an empty module, effectively removing them from the final bundle.

module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        use: 'null-loader'
      }
    ]
  }
};

Ignore specific modules

This feature allows you to ignore a specific module, such as 'some-module'. The null-loader will replace the content of this module with an empty module, effectively removing it from the final bundle.

module.exports = {
  module: {
    rules: [
      {
        test: /some-module/,
        use: 'null-loader'
      }
    ]
  }
};

Other packages similar to null-loader

Keywords

webpack

FAQs

Package last updated on 09 Oct 2020

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