<commit_before># Configuration

There are few files which allows to configure GlueStick:
* [`src/entires.json`](./Apps.md) - define entries (apps)
* [`src/vendor.js`](#vendoring) - Define vendored modules/packages
* [`src/gluestick.hooks.js`](./CachingAndHooks.md#hooks) - define hooks which will run on specific lifecycle events
* [`src/gluestick.plugins.js`](./Plugins.md) - specify which plugins to use
* [`src/gluestick.config.js`](#gluestick-config) - overwrite gluestick config
* [`src/webpack.hooks.js`](./CachingAndHooks.md#webpack-hooks) - overwrite webpack client and server configuation
* [`src/config/application.js`](#global-project-config) - global project configuration
* [`src/config/caching.server.js`](./CachingAndHooks.md#caching) - setup component caching
* `src/config/init.browser.js` - specify code which will run right before client bundle is run in browser
* [`src/config/redux-middleware.js`](#redux-config) - specify additional redux middleware and overwrite thunk middleware

## Redux config
All redux configuration can be specified in `src/config/redux-middleware.js` file.

The `default` export should return array of additional middlewares.
To specify custom thunk middleware export it using named `thunkMiddleware` export:
```
export default []; // additional middlewares
export const thunkMiddleware = thunk.withExtraArgument({ api: /* ... */ });
```
This allows you to [inject custom argument](https://github.com/gaearon/redux-thunk#injecting-a-custom-argument).

**IMPORTANT**: This configuration is project wide, meaning it will be used for every app/entrypoint.
If you need to overwrite it for specific app/entrypoint, you must create configuration file for this
app/entrypoint, update `src/entries.json` to use that file (more on this [here](./Apps.md)) and write additional property `reduxOptions: { middlewares: Function[], thunk: ?Function }`.

## Global project config
All project-wide configuration lives here in `src/config/application.js`.

GlueStick itself will look only for those properties:
* `proxies` - setup additional proxies
* `httpClient` - configure http client
* `headContent` - configure page `<title>` element
* `logger` - configure logger

However, you can put your own properties here and read them by importing this files via alias `config/application`.
<commit_msg>Fix links in Configuration.md (#1123)<commit_after># Configuration

There are few files which allows to configure GlueStick:
* [`src/entires.json`](./configuration/Apps.md) - define entries (apps)
* [`src/vendor.js`](#vendoring) - Define vendored modules/packages
* [`src/gluestick.hooks.js`](./configuration/CachingAndHooks.md#hooks) - define hooks which will run on specific lifecycle events
* [`src/gluestick.plugins.js`](./configuration/Plugins.md) - specify which plugins to use
* [`src/gluestick.config.js`](#gluestick-config) - overwrite gluestick config
* [`src/webpack.hooks.js`](./configuration/CachingAndHooks.md#webpack-hooks) - overwrite webpack client and server configuation
* [`src/config/application.js`](#global-project-config) - global project configuration
* [`src/config/caching.server.js`](./configuration/CachingAndHooks.md#caching) - setup component caching
* `src/config/init.browser.js` - specify code which will run right before client bundle is run in browser
* [`src/config/redux-middleware.js`](#redux-config) - specify additional redux middleware and overwrite thunk middleware

## Redux config
All redux configuration can be specified in `src/config/redux-middleware.js` file.

The `default` export should return array of additional middlewares.
To specify custom thunk middleware export it using named `thunkMiddleware` export:
```
export default []; // additional middlewares
export const thunkMiddleware = thunk.withExtraArgument({ api: /* ... */ });
```
This allows you to [inject custom argument](https://github.com/gaearon/redux-thunk#injecting-a-custom-argument).

**IMPORTANT**: This configuration is project wide, meaning it will be used for every app/entrypoint.
If you need to overwrite it for specific app/entrypoint, you must create configuration file for this
app/entrypoint, update `src/entries.json` to use that file (more on this [here](./configuration/Apps.md)) and write additional property `reduxOptions: { middlewares: Function[], thunk: ?Function }`.

## Global project config
All project-wide configuration lives here in `src/config/application.js`.

GlueStick itself will look only for those properties:
* `proxies` - setup additional proxies
* `httpClient` - configure http client
* `headContent` - configure page `<title>` element
* `logger` - configure logger

However, you can put your own properties here and read them by importing this files via alias `config/application`.

{'fraction_non_alphanumeric': 0.11586901763224182, 'fraction_numerical': 0.0008396305625524769, 'mean_word_length': 5.156330749354005, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '196320', 'n_tokens_mistral': 1343, 'n_tokens_neox': 1326, 'n_words': 456}