Skip to content

Commit

Permalink
fix esbuild issue when requiring esm files
Browse files Browse the repository at this point in the history
  • Loading branch information
crysmags committed Oct 11, 2024
1 parent 734655d commit c08efa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/datadog-esbuild/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ module.exports.setup = function (build) {

let pathToPackageJson
try {
pathToPackageJson = require.resolve(extracted.pkg, { paths: [args.resolveDir] })
pathToPackageJson = require.resolve(`${extracted.pkg}`, { paths: [args.resolveDir] })
pathToPackageJson = extractPackageAndModulePath(pathToPackageJson).pkgJson
} catch (err) {
if (err.code === 'MODULE_NOT_FOUND') {
Expand Down

0 comments on commit c08efa5

Please sign in to comment.