Enable or disable Wordpress debug using webpack
MIT License
Enable or disable Wordpress debug using webpack
npm install --save-dev wordpress-debug-webpack-plugin
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
})
]
};
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
.Feel free to push your code if you agree with publishing under the MIT license.