Skip to content

[FIX] #7 node_modules with .js in the name #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 26, 2018
Merged

[FIX] #7 node_modules with .js in the name #5

merged 2 commits into from
Oct 26, 2018

Conversation

vkrol
Copy link
Contributor

@vkrol vkrol commented Oct 17, 2018

If the "import/extensions" rule is activated then the following import statement causes the error:

import "popper.js";

causes the following error

Resolve error: Cannot find module 'popper' from 'D:\Projects\eslint-import-resolver-typescript\tests'  import/extensions

This code is ported from the previous version of the file 87a9e00#diff-168726dbe96b3ce427e7fedce31bb0bcL20

These changes fixes this error. I do not know how to test it correctly via unit test because we need to install some npm package with ".js" suffix in the name for this test.

@bradzacher
Copy link
Collaborator

hi @vkrol - feel free to install popper.js as a dev dependency, and add it to the test file as an import.

then you can test it using npm test

@bradzacher bradzacher changed the title Fix modules resolving with .js in the name Fix #6 modules resolving with .js in the name Oct 24, 2018
@bradzacher bradzacher changed the title Fix #6 modules resolving with .js in the name Fix #7 modules resolving with .js in the name Oct 24, 2018
@bradzacher bradzacher changed the title Fix #7 modules resolving with .js in the name [FIX] #7 node_modules with .js in the name Oct 24, 2018
@vkrol
Copy link
Contributor Author

vkrol commented Oct 25, 2018

@bradzacher I think that I found a better solution.

@bradzacher bradzacher self-requested a review October 26, 2018 15:38
@bradzacher bradzacher merged commit f82c1ff into import-js:master Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants