Skip to content

Commit 3ce9644

Browse files
committed
Fix: Error with entry file paths beginning with ./
Reference: rollup#43
1 parent 4cb2718 commit 3ce9644

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export default function nodeResolve ( options ) {
2222
resolveId ( importee, importer ) {
2323
if ( /\0/.test( importee ) ) return null; // ignore IDs with null character, these belong to other plugins
2424

25+
// disregard entry module
26+
if ( !importer ) return null;
27+
2528
let parts = importee.split( /[\/\\]/ );
2629
let id = parts.shift();
2730

@@ -35,9 +38,6 @@ export default function nodeResolve ( options ) {
3538

3639
if ( skip !== true && ~skip.indexOf( id ) ) return null;
3740

38-
// disregard entry module
39-
if ( !importer ) return null;
40-
4141
return new Promise( ( accept, reject ) => {
4242
resolveId(
4343
importee,

0 commit comments

Comments
 (0)