Removes console calls from Gatsby production builds.
npm install gatsby-plugin-remove-console 
A plugin that adds support to remove all console.* calls from Gatsby's production builds using babel-plugin-transform-remove-console.
In
``javascript`
console.log('foo');
console.error('bar');
Out
`javascript`
`sh`
npm install gatsby-plugin-remove-console && npm install babel-plugin-transform-remove-console --save-dev
or
`sh`
yarn add gatsby-plugin-remove-console && yarn add babel-plugin-transform-remove-console --dev
. Here's an example:`javascript
// without options
module.exports = {
plugins: [
'gatsby-plugin-remove-console'
],
};
``javascript
// with options
module.exports = {
plugins: [
{
resolve: 'gatsby-plugin-remove-console',
options: {
exclude: ['error', 'warn'], // <- will be removed all console calls except these
}
}
]
};
`$3
exclude` - An array of console methods to exclude from removal.MIT, see LICENSE.md for details.
See CHANGELOG.md for details.