Home Reference Source Repository

Typedef

Static Public Summary
public

Roc builder object.

public

Roc client options.

public

Roc server options.

Static Public

public rocBuilder: Object source

Roc builder object.

Properties:

NameTypeAttributeDescription
buildConfig object

Webpack config object, can be used to extend the configuration.

builder object

Webpack instance.

See:

public rocClientOptions: Object source

Roc client options.

Used in createClient.

For example of createRoutes see createRoutes.

For example of createStore createReduxStore. *

Properties:

NameTypeAttributeDescription
createRoutes function
  • nullable: false

A function that will return a valid route object, is given the store instance in the case that there is on that can be used.

createStore function
  • optional
  • nullable: false

A function that return a Redux store instance. The interface for it is: (reduxRouter, createRoutes, history) => reduxStoreInstance. If it's not defined the application will not use Redux.

mountNode string
  • nullable: false

The id for the DOM node to mount the React application inside of.

public rocServerOptions: Object source

Roc server options.

Used in useReact.

For example of createRoutes see createRoutes.

For example of createStore createReduxStore.

The stats property can also be set in roc.config.js however the value here will override it if provided.

Properties:

NameTypeAttributeDescription
createRoutes function
  • nullable: false

A function that will return a valid route object, is given the store instance in the case that there is on that can be used.

createStore function
  • optional
  • nullable: false

A function that return a Redux store instance. The interface for it is: (reduxRouter, createRoutes, history) => reduxStoreInstance. If it's not defined the application will not use Redux.

stats string
  • nullable: false

A path to a stats JSON file. Should match the following pattern {script: string[], css: string[]}