Centralised configuration

src/
    └── config/
        ├── config.aliases.js
        ├── config.base.js
        ├── config.routes.js
        └── config.styles.js

This template has carefully been set up so that various parts of the tooling as well as app code pull configurable values from one place. Generally speaking the developer doesn't have to edit Webpack script files while setting up a new project, or doing regular application development (like defining routes).

Configuration is spread accross multiple files:

Accessing config in application code

Anywhere in your application, you can import the extended configuration and use it to trigger any behavior you want.

import config from '@config';
console.log(Object.keys(config));
// [ 'defaultLocale', 'fallbackLocale', 'meta', 'mobile', 'routes', 'styles', ... ]

Environment variables for build scripts

Some of the build scripts accept environment variables for setting things like the development server port or test driver. The supported variables and examples of how to set them are listed on the setup page.

results matching ""

    No results matching ""