From 24197b9ede6bfdc5d9cfca63d902802916a96b82 Mon Sep 17 00:00:00 2001 From: bbetts-godaddy <104379885+bbetts-godaddy@users.noreply.github.com> Date: Mon, 9 Dec 2024 10:36:28 -0800 Subject: [PATCH] change dynamic require to string interpolation (#985) --- packages/gasket-plugin-webpack/lib/webpack-metrics-plugin.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/gasket-plugin-webpack/lib/webpack-metrics-plugin.js b/packages/gasket-plugin-webpack/lib/webpack-metrics-plugin.js index 19334768c..7b809226e 100644 --- a/packages/gasket-plugin-webpack/lib/webpack-metrics-plugin.js +++ b/packages/gasket-plugin-webpack/lib/webpack-metrics-plugin.js @@ -45,8 +45,7 @@ class WebpackMetricsPlugin { let name; try { - const packagePath = path.join(context, '/package.json'); - const packageJSON = require(packagePath); + const packageJSON = require(`${context}/package.json`); name = packageJSON.name; } catch (e) {