Buckets:
| import { ConfigPlugin, JssConfig } from ".."; | |
| /** | |
| * This plugin will set computed config props. | |
| * The "graphQLEndpoint" is an example of making a _computed_ config setting | |
| * based on other config settings. | |
| */ | |
| class ComputedPlugin implements ConfigPlugin { | |
| // should come after other plugins (but before fallback) | |
| order = 10; | |
| async exec(config: JssConfig) { | |
| return Object.assign({}, config, { | |
| graphQLEndpoint: | |
| config.graphQLEndpoint || | |
| `${config.sitecoreApiHost}${config.graphQLEndpointPath}`, | |
| }); | |
| } | |
| } | |
| export const computedPlugin = new ComputedPlugin(); | |
Xet Storage Details
- Size:
- 598 Bytes
- Xet hash:
- 21bf988a2d7d14438d49e5b9f452ac123adf0113e7bd9f90593a5afde2193e16
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.