Skip to content

Commit 948165d

Browse files
authored
fix(server): use eval to prevent webpack warning (#240)
Closes #234
1 parent 71f7bcd commit 948165d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/server/src/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export const smartRequire = modulePath => {
1313
return __non_webpack_require__(modulePath)
1414
}
1515

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

2020
export const joinURLPath = (...paths) => {

0 commit comments

Comments
 (0)