Edit page
IntroductionGetting StartedRoutingCSS & StylingPublic ResourcesPage Metadata (head)Internationalization (i18n)Server Side Rendering
JavaScript flavors
Advanced Topics
ConfigurationContentshookspluginsSpecifying the path to the configuration filePluginsPreact
APICommand Line InterfaceBuild time parametersChangelogLicensePwa

RJS Configuration


Example configuration file with all entries:

"routingType": "browser",
"directories": {
"logs": "./.build",
"build": "./.build",
"resources": "./src/public",
"translations": "./src/translations"
"routes": "**/*.route.js",
"entry-react": "./src/components/App",
"render-html": "./src/render-html.js",
"pre-init": "./src/pre-init.js",
"service-worker": "./src/service-worker.js",
"plugins": {
"@reworkjs/redux": {}

All entries are optional
Paths are resolved from the location of your configuration file


Default: browser

The type of router to use, see React-Router documentation for more information on the types of routers.

Possible values: browser for BrowserRouter, hash for HashRouter

Default: ./.build

The directory in which compiled files will be outputted.

server files will be located in {}/server
client files will be located in {}/client


Default: Value of

The directory in which build & running logs will be outputted.


Default: ./src/public

This directory contains assets that should not be transformed and will merely be copied over. (default: ./src/public)

The files located inside of resources will be copied inside of the public directory in the output files.
Be careful not to use the name of a built resource (such as index.html or main.js).

See the chapter on Public Resources for more information


Default: ./src/translations

This directory contains the translation files used by react-intl. See the chapter about i18n


Default: src/**/*.route.js

A glob matching all files that should be interpreted as route definitions. See the chapter about routing for more information.


Default: none

This file allows you to specify code to run before the rest of your application is loaded. You can use it to load dependencies needed by your application, such as polyfills.

This file can have a single, optional, default export that is either a Promise, or a function (which optionally returns a Promise).

If exporting a Promise, your application will be loaded after the promise resolves

If exporting a Function, your application will be loaded after the execution of the function and after the Promise the function returns (if any) resolves.




Default: none

If specified, the file will be loaded inside of the service worker.


See The first section of Plugins


See The second section of Plugins

Specifying the path to the configuration file