Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was archived by the owner on May 1, 2020. It is now read-only.

Support Path mappings #125

Closed
Closed
@rkostrzewski

Description

@rkostrzewski

Note: for support questions, please use one of these channels:

https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/

Short description of the problem:

TypeScript version 2+ adds support for path mapping. This feature allows as to create aliases for files/folders (more info).

Currently this feature is broken for ionic-app-scripts build because folder structure is different in .tmp folder than in source folder (basically src is copied to .tmp).
ngc step fails because it can't correctly resolve imports using path mapping

What behavior are you expecting?

In tsconfig.json copied to .tmp, compilerOptions.baseUrl is set to '.' so that path mappings work correctly.

Steps to reproduce:
1.
2.
3.

insert any relevant code between the above and below backticks

Which @ionic/app-scripts version are you using?
v0.0.30

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

One possible solution is to:

  1. Add possibility of changing compilerOptions.baseUrl via own config file for ngc.
  2. Change conf/ngc.conf.js with compilerOptions.baseUrl set to '.'
  3. Change template of projects generated via ionic-cli to have tsconfig.json generated as such:
{
   "compilerOptions": {
      ...
      "baseUrl": "./src"

This change will reflect folder structure of generated .tmp by ngc step of ionic-scripts's build and will help future projects.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions