From 339c5341830022bb4c8836c6d7eed99a74cfc564 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Mon, 14 Dec 2020 10:52:31 +0100 Subject: [PATCH] =?UTF-8?q?D=C3=A9sactive=20les=20warnings=20en=20prod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publicodes/source/error.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/publicodes/source/error.ts b/publicodes/source/error.ts index 9320cea87..07ebe901b 100644 --- a/publicodes/source/error.ts +++ b/publicodes/source/error.ts @@ -63,13 +63,14 @@ export function warning( message: string, solution?: string ) { - console.warn( - `\n[ Avertissement ] + process.env.NODE_ENV !== 'production' && + console.warn( + `\n[ Avertissement ] ➡️ Dans la règle \`${coerceArray(rules).slice(-1)[0]}\` ⚠️ ${message} 💡 ${solution ? solution : ''} ` - ) + ) } export class InternalError extends EngineError {