Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
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
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:
{
"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.
I've implemented changes described in proposed solution's points 2 & 3. PR: #126
@rkostrzewski 0.0.29 not fix this see CHANGELOG not is using more the folder .tmp 馃槈
Thanks
@ramonornela yes, build dev doesn't use .tmp as in changelog.
I've meant build prod which still uses .tmp (as seen here copySrcTsToTmpDir) because it uses angular compiler as opposed to dev. As of version v0.0.30 on my CI and local machine .tmp is still created and used.
@rkostrzewski,
I don't think we are going to support this in the near future so I'm going to close this issue. Maybe we'll reconsider in the future if more people are asking for it.
Thanks,
Dan
+1
Most helpful comment
@ramonornela yes, build dev doesn't use .tmp as in changelog.
I've meant build prod which still uses .tmp (as seen here
copySrcTsToTmpDir) because it uses angular compiler as opposed to dev. As of version v0.0.30 on my CI and local machine .tmp is still created and used.