Skip to content
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

fix(compartment-mapper): avoid mislabeling cjs files as esm based on type field 2 #1230

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

naugtur
Copy link
Member

@naugtur naugtur commented Jul 1, 2022

Introduce assumptions about language vs extension into the makeExtensionParser function to prioritize resolving by extension and fall back to configured type only for ambiguous extensions (currently only js)

This looks nicer than version 1 but leaves invalid entries in types being ignored, but risking something else uses them.

An alternative: #1231

packages/compartment-mapper/src/link.js Outdated Show resolved Hide resolved
@naugtur naugtur force-pushed the naugur-fix-cjs-misinterpretation2 branch from d448c48 to d13f513 Compare July 21, 2022 13:10
@naugtur naugtur force-pushed the naugur-fix-cjs-misinterpretation2 branch from d13f513 to 5a6a501 Compare July 21, 2022 13:11
@naugtur naugtur merged commit 8f87da4 into master Jul 21, 2022
@naugtur naugtur deleted the naugur-fix-cjs-misinterpretation2 branch July 21, 2022 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants