From 3c283309d72aefd52480de9fe7bcb455ba8da512 Mon Sep 17 00:00:00 2001 From: hoo00nn Date: Wed, 13 Mar 2024 01:09:48 +0900 Subject: [PATCH] Fix lint error --- packages/webpack-why/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/webpack-why/index.js b/packages/webpack-why/index.js index 375be0ac..1aae351b 100644 --- a/packages/webpack-why/index.js +++ b/packages/webpack-why/index.js @@ -2,7 +2,10 @@ import _StatoscopeWebpackPlugin from '@statoscope/webpack-plugin' import { join } from 'node:path' function addStatoscope(limitConfig, check, webpackConfig) { - const StatoscopeWebpackPlugin = _StatoscopeWebpackPlugin.default ?? _StatoscopeWebpackPlugin + let StatoscopeWebpackPlugin = _StatoscopeWebpackPlugin; + if (StatoscopeWebpackPlugin.default) { + StatoscopeWebpackPlugin = StatoscopeWebpackPlugin.default + } if (limitConfig.why) { let shouldOpen = process.env.NODE_ENV !== 'test' && !limitConfig.saveBundle