-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(resolver): skip known ESM entries when resolving a
require
call (…
- Loading branch information
1 parent
a74bd7b
commit 5d6ea8e
Showing
13 changed files
with
99 additions
and
20 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
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
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
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
packages/playground/resolve/require-pkg-with-browser-and-module-field/index.cjs
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,8 @@ | ||
const dep = require('./dep.cjs') | ||
|
||
const msg = | ||
dep === '1.111222233334444555566e+21' | ||
? '[success] require-pkg-with-browser-and-module-field' | ||
: '[failed] require-pkg-with-browser-and-module-field' | ||
|
||
exports.msg = msg |
2 changes: 1 addition & 1 deletion
2
...equire-pkg-with-module-field/package.json → ...ith-browser-and-module-field/package.json
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
9 changes: 9 additions & 0 deletions
9
packages/playground/resolve/require-pkg-with-esm-entries/index.cjs
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,9 @@ | ||
const fromEvent = require('callbag-from-event') | ||
|
||
const msg = | ||
// should be the exported function instead of the ES Module record (`{ default: ... }`) | ||
typeof fromEvent === 'function' | ||
? '[success] require-pkg-with-esm-entries' | ||
: '[failed] require-pkg-with-esm-entries' | ||
|
||
exports.msg = msg |
9 changes: 9 additions & 0 deletions
9
packages/playground/resolve/require-pkg-with-esm-entries/package.json
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,9 @@ | ||
{ | ||
"name": "require-pkg-with-esm-entries", | ||
"private": true, | ||
"version": "1.0.0", | ||
"main": "./index.cjs", | ||
"dependencies": { | ||
"callbag-from-event": "1.3.0" | ||
} | ||
} |
8 changes: 0 additions & 8 deletions
8
packages/playground/resolve/require-pkg-with-module-field/index.cjs
This file was deleted.
Oops, something went wrong.
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.