We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad9350c commit 5e28870Copy full SHA for 5e28870
packages/server/src/util.js
@@ -5,8 +5,10 @@ export const smartRequire = modulePath => {
5
clearModuleCache(modulePath)
6
}
7
8
- // eslint-disable-next-line global-require, import/no-dynamic-require
9
- return require(modulePath)
+ // Use eval to prevent Webpack from compiling it
+ // when the server-side code is compiled with Webpack
10
+ // eslint-disable-next-line no-eval
11
+ return eval('module.require')(modulePath)
12
13
14
export const joinURLPath = (...paths) => {
0 commit comments