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

gatsby-plugin-remove-console

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-remove-console

Removes console calls from Gatsby production builds.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
decreased by-71.24%
Maintainers
1
Weekly downloads
 
Created
Source

gatsby-plugin-remove-console

NPM JavaScript Style Guide

A plugin that adds support to remove all console.* calls from Gatsby's production builds using babel-plugin-transform-remove-console.

Example

In

console.log('foo');
console.error('bar');

Out

Getting started

Install the plugin

npm install gatsby-plugin-remove-console && npm install babel-plugin-transform-remove-console --save-dev

or

yarn add gatsby-plugin-remove-console && yarn add babel-plugin-transform-remove-console --dev

Usage

Specify the plugin in your gatsby-config.js. Here's an example:

// without options
module.exports = {
  plugins: [
    'gatsby-plugin-remove-console'
  ],
};
// with options
module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-remove-console',
      options: {
        exclude: ['error', 'warn'], // <- will be removed all console calls except these
      }
    }
  ]
};

Options

Options

exclude - An array of console methods to exclude from removal.

License

MIT, see LICENSE.md for details.

Changelog

See CHANGELOG.md for details.

Keywords

FAQs

Package last updated on 02 Feb 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

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