Skip to content

Commit

Permalink
Cleanup constant/esm.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Sep 17, 2018
1 parent 13dfe74 commit ba46371
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/constant/esm.js
Expand Up @@ -14,13 +14,16 @@ const ESM = {
const { filename } = __non_webpack_module__

setDeferred(ESM, "PKG_DIRNAME", () => {
return __shared__.module.safePath.dirname(filename)
const { safePath } = __shared__.module

return safePath.dirname(filename)
})

setDeferred(ESM, "PKG_FILENAMES", function () {
const { safePath } = __shared__.module
const { sep } = safePath
const { PKG_DIRNAME } = this
const { PKG_FILENAMES } = process.env
const { sep } = __shared__.module.safePath

let { length } = PKG_FILENAMES

Expand Down

0 comments on commit ba46371

Please sign in to comment.