You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import {Chart} from'./snowfall.js'exportconst year =2023# Last year’s snowfall
In {year}, the snowfall was above average.
It was followed by a warm spring which caused
flood conditions in many of the nearby rivers.
<Chartyear={year}color="#fcb32c" />
This will probably require:
A custom parser (maybe with @mdx-js/mdx? or maybe something lower level from the unified ecosystem)
Maybe also a custom formatter? Although the imports / exports should be "just JavaScript"...
Describe alternatives you've considered
Avoiding parsing: Match and format only import and export statements at the top of the document (eg. using regular expressions)
But this would be brittle and would fail in many cases.
Additional context
--
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
MDX files are not currently sorted and unused imports and exports are not removed
Describe the solution you'd like
Similar to Vue support, also support MDX files (
.mdx
extension), which can includeimport
andexport
statementsExample file from MDX homepage:
index.mdx
This will probably require:
@mdx-js/mdx
? or maybe something lower level from the unified ecosystem)Describe alternatives you've considered
Avoiding parsing: Match and format only
import
andexport
statements at the top of the document (eg. using regular expressions)But this would be brittle and would fail in many cases.
Additional context
--
The text was updated successfully, but these errors were encountered: