-
Notifications
You must be signed in to change notification settings - Fork 7
feat: replace custom-app with react component in Fern environment #807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🌿 Documentation Preview
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces the custom-app directory with a lightweight React component integrated directly into the Fern environment, significantly reducing JavaScript overhead and improving performance. The new implementation loads only on the homepage and uses zero external dependencies beyond React.
Key changes:
- Refactored CodeConsole component with custom syntax highlighting
- Removed entire custom-app directory and build pipeline
- Implemented CSS-based hiding of builtwithfern CTA
Reviewed Changes
Copilot reviewed 187 out of 203 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added Shiki syntax highlighting dependencies |
| fern/home/index.mdx | Integrated new CodeConsole component and added CSS to hide builtwithfern element |
| fern/docs.yml | Removed custom-app JS bundle, added CodeConsole CSS |
| fern/components/CodeConsole/* | New React component with custom highlighting and theme detection |
| eslint.config.ts | Removed custom-app TypeScript project references |
| custom-app/* | Deleted entire custom-app directory |
| .github/actions/publish-fern/action.yml | Removed custom-app build step from CI |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,425 @@ | |||
| import alchemyGetAssetTransfersEthereumRequest from "./code-samples/alchemy_getAssetTransfers/ethereum-request"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately dynamic imports don't seem to work in Fern, requiring this ugliness
| @@ -1,5 +1,5 @@ | |||
| curl -X POST https://eth-mainnet.g.alchemy.com/v2/{apiKey} \ | |||
| -H "Content-Type: application/json" \ | |||
| export default `curl -X POST https://eth-mainnet.g.alchemy.com/v2/{apiKey} \\ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raw imports also don't work in Fern. The only solution I could find was to directly export these files as strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

Description
This allows us to kill the custom-app directory which introduced a ton of extra JS on all pages. This new component uses 0 dependencies outside of React, loads faster, looks better, and only loads its code on the homepage.
Related Issues
https://app.asana.com/1/1129441638109975/project/1208969177908953/task/1211273987105471?focus=true
Changes Made
Testing
pnpm run validate)