summaryrefslogtreecommitdiff
path: root/docs/src/pages/reference
diff options
context:
space:
mode:
authorGravatar natemoo-re <natemoo-re@users.noreply.github.com> 2021-07-21 23:11:40 +0000
committerGravatar GitHub Actions <actions@github.com> 2021-07-21 23:11:40 +0000
commit561cbee68f1e4e2a85d5379129bba82fea5138a1 (patch)
tree65a8e0c168bb2b2f83c48c70c556e3547560093e /docs/src/pages/reference
parentbd18e14a2c05d473b9822ddaf9ebada48e2d75dd (diff)
downloadastro-561cbee68f1e4e2a85d5379129bba82fea5138a1.tar.gz
astro-561cbee68f1e4e2a85d5379129bba82fea5138a1.tar.zst
astro-561cbee68f1e4e2a85d5379129bba82fea5138a1.zip
[ci] yarn format
Diffstat (limited to 'docs/src/pages/reference')
-rw-r--r--docs/src/pages/reference/renderer-reference.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/src/pages/reference/renderer-reference.md b/docs/src/pages/reference/renderer-reference.md
index 9dfd073a4..1a56e7639 100644
--- a/docs/src/pages/reference/renderer-reference.md
+++ b/docs/src/pages/reference/renderer-reference.md
@@ -79,11 +79,13 @@ export default {
Astro is unique in that it allows you to mix multiple types of JSX/TSX files in a single project. It does this by reading the `jsxImportSource` and `jsxTransformOptions` from renderers and transforming a file with [Babel](https://babeljs.io/).
#### `jsxImportSource`
+
This is the name of your library (for example `preact` or `react` or `solid-js`) which, if encountered in a file, will signal to Astro that this renderer should be used.
Users may also manually define `/** @jsxImportSource preact */` in to ensure that the file is processed by this renderer (if, for example, the file has no imports).
#### `jsxTransformOptions`
+
This is an `async` function that returns information about how to transform matching JSX files with [Babel](https://babeljs.io/). It supports [`plugins`](https://babeljs.io/docs/en/plugins) or [`presets`](https://babeljs.io/docs/en/presets) to be passed directly to Babel.
> Keep in mind that this transform doesn't need to handle TSX separately from JSX, Astro handles that for you!