DEV Community

[Comment from a deleted post]
Collapse
 
eugbyte profile image
Eugene

On a side note, do you know how to set up path alias for Ionic 6?
I did this in ts.config.json,

"baseUrl": "./",
    "paths": {
      "~/*": ["./src/*"]
    },
Enter fullscreen mode Exit fullscreen mode

My IDE does not complain when I import like so, import { myPage} from '~/components/myPage', but Ionic is unable to compile, with the error Can't resolve '~/components/myPage' in 'myApp\src\components'

Collapse
 
daviddalbusco profile image
David Dal Busco

Don't know, never tried 🤷‍♂️

Collapse
 
_andypeacock profile image
Andrew Peacock

Hi Eugene,
Did you ever find a solution for this? I'm grappling with the same issue
Andy