# Ionic 6 TypeScript Path Alias Configuration

**URL:** <https://forum.ionicframework.com/t/ionic-6-typescript-path-alias-configuration/222712>\
**Category:** Ionic Vue\
**Created:** [April 26, 2022, 4:01pm UTC](https://forum.ionicframework.com/t/ionic-6-typescript-path-alias-configuration/222712 "2022-04-26T16:01:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmcnicholas](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/cmcnicholas/32/141391_2.png) [@cmcnicholas](https://forum.ionicframework.com/u/cmcnicholas)\
**Post date:** [April 26, 2022, 4:01pm UTC](https://forum.ionicframework.com/t/ionic-6-typescript-path-alias-configuration/222712/1 "2022-04-26T16:01:01Z")

</div>

I am trying to connect Ionic Vue up to an existing MonoRepo with some vue projects and many raw TypeScript projects that include our business code/services etc.

I would like to configure Ionic Vue to use our TypeScript path aliases e.g.

_tsconfig.json_

```auto
"paths": {
      "@/*": [
        "./src/*"
      ],
      "@core/*": ["../projects/core/src/*"],
}

```

I have done this but get the error:

`Module not found: Error: Can't resolve '@core/error/CustomError' in 'D:\dev\repo\myApp\src\views'`

To get this to work with vite and webpack in web projects we usually have to define our aliases in their configs e.g.

_vite.config.js_

```auto
resolve: {
      extensions: ['.tsx', '.ts', '.js', '.json', '.mjs'],
      alias: {
        '@core': path.resolve(__dirname, '../core/src'),
}

```

how do I gain access to the build config and subsequently modify it for a vue Ionic project?

---

<div class="post-metadata">

**Author:** ![cmcnicholas](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/cmcnicholas/32/141391_2.png) [@cmcnicholas](https://forum.ionicframework.com/u/cmcnicholas)\
**Post date:** [May 3, 2022, 1:29pm UTC](https://forum.ionicframework.com/t/ionic-6-typescript-path-alias-configuration/222712/2 "2022-05-03T13:29:56Z")

</div>

for those looking for answers (which is a little tricky round here might I add). I managed to get this working by telling babel how to interpret my aliases. I had to install [babel module resolver plugin](https://www.npmjs.com/package/babel-plugin-module-resolver) to get this to work.

```nohighlight
module.exports = {
  presets: ['@vue/cli-plugin-babel/preset'],
  plugins: [
    [
      'module-resolver',
      {
        alias: {
          '@core': '../projects/core/src',
        },
      },
    ],
  ],
};

```
