webpack-console-printer-plugin
v1.0.0
Published
Simple Webpack plugin for friendly console logging.
Downloads
3
Readme
Webpack Console Printer Plugin
This plugin is a hack of the Webpack message handling features in Create React App. It is heavily inspired by friendly-errors-webpack-plugin. It includes code from react-dev-utils which can be found in the utils folder.
Getting started
Installation
npm install webpack-console-printer-plugin --save-dev
Basic usage
Simply add WebpackPrinter
to the plugin section in your Webpack config.
var WebpackPrinter = require('webpack-console-printer-plugin');
var webpackConfig = {
// ...
plugins: [
new WebpackPrinter(),
],
// ...
}
Turn off errors
You need to turn off all error logging by setting your webpack config quiet option to true.
// webpack config root
{
// ...
devServer: {
// ...
quiet: true,
// ...
},
// ...
}
Options
You can pass options to the plugin:
new WebpackPrinter({
// specify apps port.
port: 3000,
// if you're feeling brave set this flag for advanced features.
experimental: true,
})
TODO
- [ ] Add unit testing.