-
Notifications
You must be signed in to change notification settings - Fork 0
Output languages
Ross Morsali edited this page May 22, 2022
·
4 revisions
There are 2 officially supported output languages, and the ability to create custom languages:
Note Handlebars is provided as a "catch all", an option that can be used in many scenarios. But it is recommended to build straight to your server side language if possible, to improve rendering performance and reduce dependencies on your server side application.
This should be done in your babel configuration and is as simple as passing a language
property to initialisation:
The default langauge is Handlebars so no configuration is required:
plugins: [
[ 'babel-plugin-jsx-template-vars' ],
],
Or you could supply the language name handlebars
:
plugins: [
[ 'babel-plugin-jsx-template-vars', { language: 'handlebars' } ],
],
Set the language to php
.
plugins: [
[ 'babel-plugin-jsx-template-vars', { language: 'php' } ],
],
- Overview
-
Installation
- Creating a pre-render build
- Output languages
- Variable types
- Example with all supported features