bows-loader

1.0.2 • Public • Published

bows-loader

npm version

A webpack loader that injects bows (a console.log replacement) into source files.

Install

npm install bows-loader --save

Usage

Add bows-loader to your source loader chain.

...
module: {
  loaders: [
    {
      test: /\.(js|jsx)$/,
      exclude: /node_modules/,
      loaders: ["bows-loader", "babel"],
    },
  ],
},
...

Then, you can use the global log in place of console.log.

Bows is safe to use in production, see their 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.

LICENSE

MIT

Package Sidebar

Install

npm i bows-loader

Weekly Downloads

4

Version

1.0.2

License

MIT

Last publish

Collaborators

  • arrayjam