Skip to content

Latest commit

 

History

History
112 lines (82 loc) · 38.7 KB

File metadata and controls

112 lines (82 loc) · 38.7 KB

Settings for roc-package-web-app-react

Runtime

Name Description Path CLI option Default Type Required Can be empty Extensions
applicationName Default application name to use for <title>. runtime.applicationName --runtime-applicationName String Yes Yes roc-package-web-app-react
configWhitelistProperty A single property to expose to the client from node-config. Make sure that this property does NOT contain any secrets that should not be exposed to the world. runtime.configWhitelistProperty --runtime-configWhitelistProperty "DANGEROUSLY_EXPOSE_TO_CLIENT" String No No roc-package-web-app-react
favicon Path to the favicon file, specially handled on the server. runtime.favicon --runtime-favicon String No No roc-package-web-app
port Port for the server to use. runtime.port --runtime-port 3000 Integer Yes No roc-package-web-app
serve What folder the server should expose. runtime.serve --runtime-serve ["build/client"] Filepath / Array(Filepath) No roc-package-web-app
ssr If server side rendering should be enabled. runtime.ssr --runtime-ssr true Boolean Yes roc-package-web-app-react
startBundle Relative path to a bundle to start when calling "start", is not needed in most cases. runtime.startBundle --runtime-startBundle "build/server/app.js" Filepath No No roc-plugin-start, roc-package-web-app
stats Path to client stats file from build. runtime.stats --runtime-stats "build/client/webpack-stats.json" Filepath Yes No roc-package-web-app-react

Debug

Name Description Path CLI option Default Type Required Can be empty Extensions
client Filter for debug messages that should be shown for the client, see https://npmjs.com/package/debug. runtime.debug.client --runtime-debug-client "roc:*" String No Yes roc-package-web-app-react
server Filter for debug messages that should be shown for the server, see https://npmjs.com/package/debug. runtime.debug.server --runtime-debug-server "roc:*" String No Yes roc-package-web-app

Fetch

Name Description Path CLI option Default Type Required Can be empty Extensions
server What redial hooks that should run on the server and in what order. runtime.fetch.server --runtime-fetch-server ["fetch"] Array(String / Array(String)) Yes Yes roc-package-web-app-react

Client

Name Description Path CLI option Default Type Required Can be empty Extensions
afterTransition What redial hooks that should run on the client that should not block route transitions and in what order. runtime.fetch.client.afterTransition --runtime-fetch-client-afterTransition ["defer"] Array(String / Array(String)) Yes Yes roc-package-web-app-react
beforeTransition What redial hooks that should run on the client that blocks route transitions and in what order. runtime.fetch.client.beforeTransition --runtime-fetch-client-beforeTransition ["fetch"] Array(String / Array(String)) Yes Yes roc-package-web-app-react
parallel If defer hooks should be started at the same time as the blocking ones. runtime.fetch.client.parallel --runtime-fetch-client-parallel false Boolean Yes roc-package-web-app-react

Head

Settings that will be used with React Helmet. https://github.com/nfl/react-helmet

✓ ― Supports __raw

Name Description Path CLI option Default Type Required Can be empty Extensions
htmlAttributes Attributes that should be added to the <html> tag. runtime.head.htmlAttributes --runtime-head-htmlAttributes {"lang":"en"} Object() Yes Yes roc-package-web-app-react
link Link tags to be used in <head>, should be formatted as objects. runtime.head.link --runtime-head-link [{"rel":"icon","href":"favicon.png"}] Array(Object(String)) Yes Yes roc-package-web-app-react
meta Meta tags to be used in <head>, should be formatted as objects. runtime.head.meta --runtime-head-meta [{"name":"viewport","content":"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"}] Array(Object(String)) Yes Yes roc-package-web-app-react
script Script tags to be used in <head>, should be formatted as objects. runtime.head.script --runtime-head-script [] Array(Object(String)) Yes Yes roc-package-web-app-react
style Style tags to be used in <head>, should be formatted as objects. runtime.head.style --runtime-head-style [] Array(Object(String)) Yes Yes roc-package-web-app-react
titleTemplate Template to be used for <title>. runtime.head.titleTemplate --runtime-head-titleTemplate String No No roc-package-web-app-react

Base

Base tag to be used in .

Name Description Path CLI option Default Type Required Can be empty Extensions
href The document base address from which relative links are made. runtime.head.base.href --runtime-head-base-href "ROC_PATH" String No No roc-package-web-app-react
target The browsing context in which the links should open. runtime.head.base.target --runtime-head-base-target String No No roc-package-web-app-react

History

Name Description Path CLI option Default Type Required Can be empty Extensions
forceRefresh Whether to force load from server rather than do single page navigation runtime.history.forceRefresh --runtime-history-forceRefresh Boolean / Function No roc-package-web-app-react

Https

Name Description Path CLI option Default Type Required Can be empty Extensions
cert The certificate file to use when using HTTPS. If none is provided and if running in dev a file will be provided automatically. runtime.https.cert --runtime-https-cert Filepath No No roc-package-web-app
key The key file to use when using HTTPS. If none is provided and if running in dev a file will be provided automatically. runtime.https.key --runtime-https-key Filepath No No roc-package-web-app
port Port for the server to use for HTTPS. If none is defined it will not launch in HTTPS. runtime.https.port --runtime-https-port Integer No No roc-package-web-app

Koa

Settings for how Koa should handle paths.

Lowercase

Name Description Path CLI option Default Type Required Can be empty Extensions
defer If this should be performed after looking for a file on disk. runtime.koa.lowercase.defer --runtime-koa-lowercase-defer true Boolean Yes roc-package-web-app
enabled If paths should be transformed to lowercase. runtime.koa.lowercase.enabled --runtime-koa-lowercase-enabled true Boolean Yes roc-package-web-app

Normalize

Name Description Path CLI option Default Type Required Can be empty Extensions
defer If this should be performed after looking for a file on disk. runtime.koa.normalize.defer --runtime-koa-normalize-defer false Boolean Yes roc-package-web-app
enabled If paths should be normalized, that is remove extra slashes. runtime.koa.normalize.enabled --runtime-koa-normalize-enabled true Boolean Yes roc-package-web-app

StaticServe

✓ ― Supports __raw

Name Description Path CLI option Default Type Required Can be empty Extensions
maxage Browser cache max-age in milliseconds. Production only. runtime.koa.staticServe.maxage --runtime-koa-staticServe-maxage 60000 Integer Yes roc-package-web-app

TrailingSlashes

Name Description Path CLI option Default Type Required Can be empty Extensions
defer If this should be performed after looking for a file on disk. runtime.koa.trailingSlashes.defer --runtime-koa-trailingSlashes-defer true Boolean Yes roc-package-web-app
enabled Set to true to enforce trailing slashes, false to remove them and null for no rule. runtime.koa.trailingSlashes.enabled --runtime-koa-trailingSlashes-enabled true Boolean No roc-package-web-app

Template

Name Description Path CLI option Default Type Required Can be empty Extensions
name Name of the template file that will be used. Uses Nunjucks, please see documentation for more info. runtime.template.name --runtime-template-name "main.html" String Yes No roc-package-web-app-react
path A directory, or array of directories, where the template for the application can be found. Internal path with default templates will be appended to the array, so it's possible to extend them. runtime.template.path --runtime-template-path Filepath / Array(Filepath) No No roc-package-web-app-react
root If the project template should be used as the root template instead of the default one. When true `parentTemplate` will be the main template in `roc-package-web-app-react`, also called `baseTemplate`. Important that blocks are maintained for extensions to be able to add their logic. runtime.template.root --runtime-template-root false Boolean Yes roc-package-web-app-react