Skip to content

Commit

Permalink
fix lightningcss bug on double var(), fix Nextjs turbopack parcel-bun…
Browse files Browse the repository at this point in the history
  • Loading branch information
remorses committed Feb 4, 2025
1 parent 3165775 commit a19c031
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,16 @@ If you find any errors rendering your components:
- Color, a string
- React component, created when you use a `component` variable in Framer, for example in the Ticker component

## What should I use Unframer for?

While having the ability to export Framer components to React is a powerful feature, you should try not to put any business logic in Framer if you want to use the React export feature.

This of Framer as a stateless UI design tool, you can design components in Framer and export them to React, passing any kind of scalar value as a prop.

If you find yourself writing custom code components and overrides in Framer, you would find it much easier to write custom code in your React codebase instead.

You can basically do anything you want by designing components in Framer and rendering them in your app.

## Known limitations:

- You may face React warnings like:
Expand Down
6 changes: 6 additions & 0 deletions unframer/scripts/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ export async function fixFramerCode({ resultFile }) {
'Could not find expected ReferenceError string in bundle',
)
}

// fix lightningcss bug on double var(), fix Nextjs turbopack https://github.com/parcel-bundler/lightningcss/issues/897
codeAfter = codeAfter.replace(
`font-family: var(var(--framer-code-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif)))`,
`font-family: var(--framer-code-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif))`,
)
codeAfter += '\n\n'
codeAfter += dedent`
export { Link as FramerLink }
Expand Down

0 comments on commit a19c031

Please sign in to comment.