payload icon indicating copy to clipboard operation
payload copied to clipboard

feat(ui): compile using react compiler

Open AlessioGr opened this issue 1 year ago • 0 comments

Description

Adds build:reactcompiler command, which builds ui using babel + babel-plugin-react-compiler instead of swc

Learnings

When used in a project, we saw this error: CleanShot 2024-05-23 at 19 46 27 Cannot read properties of undefined (reading 'H'). This is due to https://github.com/facebook/react/pull/29057. Changed it to only compile client components explicitly marked with 'use client', that fixes it

  • [ ] I have read and understand the CONTRIBUTING.md document in this repository.

Type of change

  • [ ] Chore (non-breaking change which does not add functionality)
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Change to the templates directory (does not affect core functionality)
  • [ ] Change to the examples directory (does not affect core functionality)
  • [ ] This change requires a documentation update

Checklist:

  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] Existing test suite passes locally with my changes
  • [ ] I have made corresponding changes to the documentation

AlessioGr avatar May 23 '24 23:05 AlessioGr