Skip to content

Commit

Permalink
change dynamic require to string interpolation (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbetts-godaddy authored and agerard-godaddy committed Dec 11, 2024
1 parent 21c240e commit 24197b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/gasket-plugin-webpack/lib/webpack-metrics-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 24197b9

Please sign in to comment.