I decided to shorten my imports in my react app. So I configured the `jsconfig.json`.

My problem is that its giving error on importing.

```
Failed to compile. ./src/actions/appActions.js
Module not found: Can't resolve '@constants' 

```

Please see codes below.

**REPO**

```
https://drive.google.com/drive/folders/1rp5AagwvMyBRbhb4svHUqyCYH3ROA-L3?usp=sharing

```

**jsconfig.json**

```
 {
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@components": ["src/components"],
      "@actions": ["src/actions"],
      "@constants": ["src/constants"],
      "@constants/*": ["src/constants/*"],
      "@services": ["src/services"],
      "@assets": ["src/assets"]
    }
  }
}

```

**appActions.js**

```
import { appConstants } from '@constants';

export const setAPIErrorMessage = (error) => {
  return {
    type: appConstants.SET_API_ERROR_MESSAGE,
    payload: error,
  };
};

export const setAPISuccessMessage = (error) => {
  return {
    type: appConstants.SET_API_SUCCESS_MESSAGE,
    payload: error,
  };
};

```

**constants > index.js**

```
export * from './authConstants';
export * from './appConstants';

```

**constants > appConstants.js**

```
export const appConstants = {
  SET_API_ERROR_MESSAGE: 'SET_API_ERROR_MESSAGE',
  SET_API_SUCCESS_MESSAGE: 'SET_API_SUCCESS_MESSAGE',
};

```

[![enter image description here](https://i.stack.imgur.com/lxjVx.png)](https://i.stack.imgur.com/lxjVx.png)