Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b0e12e7

Browse files
committed
Add Webpack comment vis-a-vis eval
1 parent 7e12bd7 commit b0e12e7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2906,6 +2906,8 @@ const wrapRequire = new Proxy(require, {
29062906
const modulePath = target.resolve.apply(thisArg, [
29072907
moduleID,
29082908
{
2909+
// Webpack does not have an escape hatch for getting the actual
2910+
// module, other than `eval`.
29092911
paths: eval('module').paths.concat(process.cwd())
29102912
}
29112913
]);

src/wrap-require.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export const wrapRequire = new Proxy(__non_webpack_require__, {
1313
const modulePath = target.resolve.apply(thisArg, [
1414
moduleID,
1515
{
16+
// Webpack does not have an escape hatch for getting the actual
17+
// module, other than `eval`.
1618
paths: eval('module').paths.concat(process.cwd())
1719
}
1820
])

0 commit comments

Comments
 (0)