setConfig
The setConfig
function is used to set the configuration for Faust. It is used in the faust.config.js
file to set the configuration options for Faust.
import { setConfig } from "@faustwp/core";
import templates from "./wp-templates";
import possibleTypes from "./possibleTypes.json";
/**
* @type {import('@faustwp/core').FaustConfig}
**/
export default setConfig({
templates,
possibleTypes,
});
The setConfig
function takes an object as an argument with the following properties:
basePath
: A string that configures the base path for the WP site. This is optional.experimentalToolbar
: This feature is is Deprecated and no longer being maintained. A boolean that determines whether the Faust toolbar is enabled. This is optional and defaults tofalse
.plugins
: An array of plugins to be used with Faust. This is optional.possibleTypes
: An object that contains the possible types for your site. This is required.templates
: An object that contains the templates for your site. This is required.usePersistedQueries
: A boolean that determines whether to use automatic persisted queries. This is optional and defaults tofalse
.useGETForQueries
: A boolean that determines whether to use GET requests for queries. This is optional and defaults totrue
.
For more details on the configuration options and their types, refer to the implementation code.