Skip to content

Commit a19c031

Browse files
committed
fix lightningcss bug on double var(), fix Nextjs turbopack parcel-bundler/lightningcss#897
1 parent 3165775 commit a19c031

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,16 @@ If you find any errors rendering your components:
256256
- Color, a string
257257
- React component, created when you use a `component` variable in Framer, for example in the Ticker component
258258

259+
## What should I use Unframer for?
260+
261+
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.
262+
263+
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.
264+
265+
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.
266+
267+
You can basically do anything you want by designing components in Framer and rendering them in your app.
268+
259269
## Known limitations:
260270

261271
- You may face React warnings like:

unframer/scripts/download.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ export async function fixFramerCode({ resultFile }) {
211211
'Could not find expected ReferenceError string in bundle',
212212
)
213213
}
214+
215+
// fix lightningcss bug on double var(), fix Nextjs turbopack https://github.com/parcel-bundler/lightningcss/issues/897
216+
codeAfter = codeAfter.replace(
217+
`font-family: var(var(--framer-code-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif)))`,
218+
`font-family: var(--framer-code-font-family, var(--framer-font-family, Inter, Inter Placeholder, sans-serif))`,
219+
)
214220
codeAfter += '\n\n'
215221
codeAfter += dedent`
216222
export { Link as FramerLink }

0 commit comments

Comments
 (0)