JSX provider API
The Jsx Provider is special object that provides integration with JSX libraries and instructs Zuby.js how to render the components.
It also contains default templates such as layout.jsx, error.jsx, app.jsx etc…
JsxProvider is configured under jsx option of the ZubyConfig in zuby.config.mjs file.
JsxProvider API
Section titled “JsxProvider API”The section describes all properties of JsxProvider type.
The name of the Jsx Provider.
- Type:
string - Required:
true
getPlugins()
Section titled “getPlugins()”A method that returns an array of Vite plugin options.
- Type:
() => VitePluginOption[] | VitePluginOption[][] - Required:
true
renderFile
Section titled “renderFile”The file used for rendering.
- Type:
string - Required:
true
appTemplateFile
Section titled “appTemplateFile”The default app.jsx template file.
- Type:
string - Required:
true
entryTemplateFile
Section titled “entryTemplateFile”The entry template file.
- Type:
string - Required:
true
layoutTemplateFile
Section titled “layoutTemplateFile”The default layout.jsx template file.
- Type:
string - Required:
true
innerLayoutTemplateFile
Section titled “innerLayoutTemplateFile”The inner layout template file.
- Type:
string - Required:
true
errorTemplateFile
Section titled “errorTemplateFile”The default error.jsx template file.
- Type:
string - Required:
true