webpack-blocks-bows
v0.2.0
Published
A webpack block that injects bows (a console.log replacement) into source files.
Downloads
1
Maintainers
Readme
webpack-blocks-bows
A webpack block that injects bows (a console.log replacement) into source files.
This package uses bows-loader under the hood.
Install
$ yarn add -D webpack-blocks-bows
Or with npm:
$ npm install --save-dev webpack-blocks-bows
Usage
const { createConfig } = require('@webpack-blocks/webpack2');
const babel = require('@webpack-blocks/babel6');
const bows = require('webpack-blocks-bows');
const config = createConfig([
babel(),
bows(),
]);
Then, you can use the global log(...)
in place of console.log(...)
.
Checkout the bows documentation for more details.
.eslintrc changes
Since you'll be using a new global in your source, eslint should complain about this. Either add
log
as a global, or use eslint-config-bows-loader.
API
bows
Returns a webpack block that injects bows global log(...)
function.
Parameters
options
Options
Returns Function
Exclude
Type: (string | RegExp | Array<string> | Array<RegExp>)
Options
Type: {exclude: Exclude?}
Properties
exclude
Exclude?