Skip to content

Should acornOptions be exposed to @mdx-js/mdx compile? #1828

Answered by wooorm
EricMCornelius asked this question in Ideas
Discussion options

You must be logged in to vote

For your use case: I’d recommend against it. The whole module has to wait for an HTTP call while it’s being imported. And the module is only loaded once so the top-level await runs once for your whole app’s lifetime. I think it’d be much better to use your frameworks data loading features to run async work when a component is mounted for example.

Top-level await is useful. But I’d rather switch to a moving target of current JavaScript features rather than exposing all the possible internals. Similar to how we follow latest CommonMark, it’s on 2020 now (also in a couple other places). Not sure what the policy should be when to switch to 2022 (which include TLA)

Replies: 2 comments 16 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ChristianMurphy
Comment options

You must be logged in to vote
16 replies
@wooorm
Comment options

@reubn
Comment options

@wooorm
Comment options

@reubn
Comment options

@wooorm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants