diff --git a/packages/plugin-debug/.npmignore b/packages/plugin-debug/.npmignore index 154968db3c2..235dbbb2f5b 100644 --- a/packages/plugin-debug/.npmignore +++ b/packages/plugin-debug/.npmignore @@ -1,4 +1,2 @@ src .editorconfig -rollup.browser.js -rollup.node.js diff --git a/packages/plugin-debug/src/index.js b/packages/plugin-debug/src/index.js index 1ae37280a63..cdf555d8b0f 100644 --- a/packages/plugin-debug/src/index.js +++ b/packages/plugin-debug/src/index.js @@ -5,15 +5,26 @@ export default { version: version, hooks: { debug: function(next, d = "", e = "", b = "", u = "", g = "") { - console.log( - "%cDebug", - "color: #dd69dd; font-weight: bold", - d, - e, - b, - u, - g + if(typeof d === 'object' && d.debug === 'custom') { + console.log( + "%c"+d.text, + d.style, + e, + b, + u, + g ); + } else { + console.log( + "%cDebug", + "color: #dd69dd; font-weight: bold", + d, + e, + b, + u, + g + ); + } next(); } }