From cd6f1e9f02adab3a434d9e845f99d6ab1f9e309a Mon Sep 17 00:00:00 2001 From: Juanfran Date: Mon, 22 Apr 2024 15:02:22 +0200 Subject: [PATCH] feat: unsafe consoleTaming in dev for react dev tools --- libs/plugins-runtime/src/index.ts | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/plugins-runtime/src/index.ts b/libs/plugins-runtime/src/index.ts index 1b65e98..ad2dc63 100644 --- a/libs/plugins-runtime/src/index.ts +++ b/libs/plugins-runtime/src/index.ts @@ -9,6 +9,7 @@ console.log('Loading plugin system'); repairIntrinsics({ evalTaming: 'unsafeEval', + consoleTaming: import.meta.env.MODE === 'development' ? 'unsafe' : 'safe', }); // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -29,4 +30,4 @@ globalThis.initPluginsRuntime = (context: PenpotContext) => { /* eslint-enable */ } -} +}; diff --git a/package.json b/package.json index 8f18591..61f135f 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "license": "MIT", "scripts": { - "start": "npx nx run plugins-runtime:build --watch & npx nx run plugins-runtime:preview", + "start": "npx nx run plugins-runtime:build --watch --mode development & npx nx run plugins-runtime:preview", "start:example": "npx nx run example-plugin:build --watch & npx nx run example-plugin:preview", "start:read-plugin": "npx nx run poc-state-read-plugin:build --watch & npx nx run poc-state-read-plugin:preview", "start:contrast-plugin": "npx nx run contrast-plugin:build --watch & npx nx run contrast-plugin:preview",