-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix browser entry-point resolution (#1284)
Fixes #1283
- Loading branch information
1 parent
0b3d80f
commit 98a293f
Showing
5 changed files
with
31 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
const required = require('./pkg-browser-multiple/projected') | ||
const projected = require('./pkg-browser-multiple/projected') | ||
|
||
if(required.test() !== 'pkg-browser-multiple') { | ||
if(projected.test() !== 'pkg-browser-multiple') { | ||
throw new Error('Invalid module') | ||
} | ||
|
||
export const test = required.test | ||
const entry = require('./pkg-browser-multiple') | ||
|
||
if(entry.test() !== 'pkg-browser-multiple browser-entry') { | ||
throw new Error('Invalid module') | ||
} | ||
|
||
export const test = {projected, entry} |
3 changes: 3 additions & 0 deletions
3
test/integration/resolve-entries/pkg-browser-multiple/browser-entry.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 @@ | ||
export function test() { | ||
return 'pkg-browser-multiple browser-entry' | ||
} |
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