Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ariporad committed Feb 24, 2017
1 parent 80da8ec commit 505113b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,14 +388,14 @@ export default class Bundle {
const name = Object.keys( module.imports )
.find( name => {
const declaration = module.imports[ name ];
return declaration.source === source;
return declaration.source.endsWith(source);
});

const declaration = module.imports[ name ].specifier.parent;

module.error({
code: 'CANNOT_IMPORT_SELF',
message: `A module cannot import itself`
message: `A module cannot import itself: ${source}`
}, declaration.start );
}

Expand Down

0 comments on commit 505113b

Please sign in to comment.