Does the order of the "macro" export condition matter? #17791
Unanswered
GeorgeTaveras1231
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the documentation example here, the example places the
macro
condition after thedefault
condition. This seems unusual since export conditions should generally be sorted from most to least specific, butmacro
is a very specific condition. In addition, most runtimes will use thedefault
condition as the final fallback. My inclination is to think that themacro
condition should be towards the top of theexports
field (not the bottom, as in the example). Am I correct?I can test this myself but thought I would ask since my focus is not on actually using this, but am doing research as I work on a sorting algorithm for package.json export fields (See this PR in sort-package-json repo).
Beta Was this translation helpful? Give feedback.
All reactions