-
-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(commonjs): prevent rewrite require.resolve (#446)
- Loading branch information
1 parent
3fb72b6
commit 30a8c91
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/commonjs/test/fixtures/form/ndoe-require-methods/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports.getFilePath = function getFilePath(someFile) { | ||
return require.resolve(someFile); | ||
}; |
11 changes: 11 additions & 0 deletions
11
packages/commonjs/test/fixtures/form/ndoe-require-methods/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var getFilePath = function getFilePath(someFile) { | ||
return require.resolve(someFile); | ||
}; | ||
|
||
var input = { | ||
getFilePath: getFilePath | ||
}; | ||
|
||
export default input; | ||
export { input as __moduleExports }; | ||
export { getFilePath }; |