---
title: Project Configuration
---

# Project Configuration

Used to declare configuration information when compiling the project. The configuration file `ray.config.ts` is located in the project root directory.

## resolveAlias

Type: `object`

Module alias, which can be used to replace the module name or default path during build time. `{ '@': './src' }` is supported by default.

```diff
- import Foo from '../../components/foo/index';
+ import Foo from '@/components/foo/index';
```

## define

Type: `object`

Define global variables, which can be used to replace variable names during build time.

```ts
const config: RayConfig = {
  define: {
    'process.env.NODE_ENV': 'production',
  },
};
```

## Example

```ts
import {RayConfig} from '@ray-js/types';

const config: RayConfig = {
  resolveAlias: {
    '@': './src',
  },
  define: {
    'process.env.NODE_ENV': 'production',
  },
};

export default config;
```
