Working with TypeScript, webpack and Ionic

Hi,

“As your project evolves you’ll want to move things around and updating an alias is a lot easier then refactoring all your import paths!”

Instead of this:

import { HomePage } from '../pages/home/home';

Do this:

import { HomePage } from '@pages/home/home';

See: https://robferguson.org/blog/2017/11/22/working-with-typescript-webpack-and-ionic-3/

Cheers
Rob

3 Likes