From 785b16a642e3d29b4bfdca6352dfb2190e0460bd Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Mon, 26 Jul 2021 16:23:01 +0200 Subject: [PATCH] fix: allow to ignore `reduce-css-calc` with webpack without error --- packages/core/ui/core/properties/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/ui/core/properties/index.ts b/packages/core/ui/core/properties/index.ts index 329aa5390..2c0eaf5a8 100644 --- a/packages/core/ui/core/properties/index.ts +++ b/packages/core/ui/core/properties/index.ts @@ -1,4 +1,3 @@ -import * as reduceCSSCalc from 'reduce-css-calc'; import { ViewBase } from '../view-base'; @@ -153,7 +152,7 @@ export function _evaluateCssCalcExpression(value: string) { if (isCssCalcExpression(value)) { // WORKAROUND: reduce-css-calc can't handle the dip-unit. - return reduceCSSCalc(value.replace(/([0-9]+(\.[0-9]+)?)dip\b/g, '$1')); + return require('reduce-css-calc')(value.replace(/([0-9]+(\.[0-9]+)?)dip\b/g, '$1')); } else { return value; }