<commit_before># Configuration

## `env`

- Type: `object`

Use build-time environment variables, matched variables in your app code will be replaced with supplied value.

For example:

```js
module.exports = {
  env: {
    API_ENDPOINT:
      process.env.NODE_ENV === 'production'
        ? 'https://api.my.com'
        : 'http://localhost:4040',
  },
}
```

Then you can use `process.env.API_ENDPOINT` in your app code.

## `plugins`

[TODO]

## `css`

- Type: `string[]`

Use global CSS.

Example:

```js
module.exports = {
  css: ['bulma/css/bulma.css', '@/css/style.css'],
}
```

Webpack alias also work here.

## `vite`

Extend Ream's internal [Vite config](https://vitejs.dev/config/).

```js
module.exports = {
  vite(config, { ssr, dev }) {
    // Mutate the config object here
  },
}
```
<commit_msg>docs: update configuration<commit_after># Configuration

Supported configuration file for Ream: `ream.config.ts` or `ream.config.js`, export the config object like this:

```ts
// ream.config.js

export default {
  // ...your config
}
```

Or with TypeScript:unit

```ts
// ream.config.ts
import { ReamConfig } from 'ream'

const config: ReamConfig = {
  // ...your config
}

export default config
```

All config options are documented below.

## `env`

- Type: `object`

Use build-time environment variables, matched variables in your app code will be replaced with the supplied value.

For example:

```js
module.exports = {
  env: {
    API_ENDPOINT:
      process.env.NODE_ENV === 'production'
        ? 'https://api.my.com'
        : 'http://localhost:4040',
  },
}
```

Then you can use `import.meta.env.API_ENDPOINT` in your app code.

## `plugins`

- Type: `ReamPlugin[]`

Use Ream plugins. e.g.

```ts
import ga from '@ream/plugin-google-analytics'

export default {
  plugins: [ga()],
}
```

## `imports`

- Type: `string[]`

Prepend some `import` statements to both server and client entries, which can be useful to importing global CSS or adding some polyfills.

Example:

```js
module.exports = {
  imports: ['./some-polyfill'],
}
```

## `vite`

Extend Ream's internal [Vite config](https://vitejs.dev/config/).

```js
module.exports = {
  vite(config, { ssr, dev }) {
    // Mutate the config object here
  },
}
```

{'fraction_non_alphanumeric': 0.1601248884924175, 'fraction_numerical': 0.003568242640499554, 'mean_word_length': 3.296934865900383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '5792220', 'n_tokens_mistral': 795, 'n_tokens_neox': 770, 'n_words': 223}