Skip to content

Commit

Permalink
fix(server): use require instead of module.require (#457)
Browse files Browse the repository at this point in the history
this improves support with 'esm' package

Closes #455
  • Loading branch information
brandon-pereira authored and gregberge committed Dec 2, 2019
1 parent 3024348 commit 064b4f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server/src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const smartRequire = modulePath => {
}

// eslint-disable-next-line global-require, import/no-dynamic-require, no-eval
return eval('module.require')(modulePath)
return eval('require')(modulePath)
}

export const joinURLPath = (publicPath, filename) => {
Expand Down

0 comments on commit 064b4f8

Please sign in to comment.