/wordpress-debug-webpack-plugin

Enable or disable Wordpress debug using webpack

Primary LanguageJavaScriptMIT LicenseMIT

wordpress-debug-webpack-plugin

NPM version Travis Build Status dependencies Status devDependencies Status Greenkeeper badge

Enable or disable Wordpress debug using webpack

Install

npm install --save-dev wordpress-debug-webpack-plugin

Usage

Enable debug:

import WordpressDebugWebpackPlugin from 'wordpress-debug-webpack-plugin';

export default {
  plugins: [
    new WordpressDebugWebpackPlugin({
        wpConfigPath: 'path/to/wp-config.php', 
        debug: true
    })
  ]
};

Disable debug:

import WordpressDebugWebpackPlugin from 'wordpress-debug-webpack-plugin';

export default {
  plugins: [
    new WordpressDebugWebpackPlugin({
        wpConfigPath: 'path/to/wp-config.php', 
        debug: false
    })
  ]
};

API

  • wpConfigPath (require) string - Path to wp-config.php.
  • debug (optional) (default: true) boolean - Enable or disable debug.
  • runOnce (optional) (default: true) boolean - Enable or disable multiple run, useful for watch mode.

Related

Contribution

Feel free to push your code if you agree with publishing under the MIT license.