Skip to content

Skip files from package.json "main" or "types" if they have an unsupported extension. #13024

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
Dec 20, 2016

Conversation

ghost
Copy link

@ghost ghost commented Dec 19, 2016

Fixes #13004
The problem there is that the normalize.css module lists a file "normalize.css" as its "main" entry point.

@ghost
Copy link
Author

ghost commented Dec 19, 2016

Will need to rebase onto #13025 (when it's merged) to fix tests.

return resolvedFromAnyFile(fromFile);
const fromExactFile = tryFile(mainOrTypesFile, failedLookupLocations, onlyRecordFailures, state);
if (fromExactFile) {
const resolved = fromExactFile && resolvedFromSuspiciousFile(extensions, fromExactFile);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd name it resolveIfExtensionMatches

@mhegazy mhegazy merged commit 328a5ef into master Dec 20, 2016
@mhegazy mhegazy deleted the package_json_unsupported_extension branch December 20, 2016 23:44
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants