Skip to content

transformer-attributify-jsx blocks Astro MDX file rendering #4384

@TheJiahao

Description

@TheJiahao

UnoCSS version

65.4.0

Describe the bug

Astro build becomes extremely slow when

  • a MDX file contains:
    • heading
    • TypeScript, HTML or JavaScript codeblock with bracketed content <content>
    • footnote
  • transformerAttributifyJsx is loaded

The issue starts from v0.60.1, previous versions does't have the issue.

Reproduction

  1. Add MDX and UnoCSS integrations in astro.config.ts
  2. Load transformerAttributifyJsx in unocss.config.ts
  3. Add a MDX file to src/pages with, for example (remove "\"):
# Heading

\```html
<anything>
\```

[^footnote]

[^footnote]: Content
  1. Run astro build and it won't finish

Minimal reproduction in StackBlitz, https://stackblitz.com/edit/withastro-astro-pgoyxnq9?file=src%2Fpages%2Findex.mdx
Run pnpm install and pnpm astro build to build.

System Info

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions