-
Notifications
You must be signed in to change notification settings - Fork 12k
feature: add support for the new TypeScript / Webpack ... resolve: { alias: { #5031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is already covered with |
I saw that tsconfig had it but was not aware that CLI had as well |
born2net, does it work for you? I've added this to my tsconfig.json:
Path to the constants file: When I import it as usual But when I use absolute path, it crashes: Webpack error:
|
nope I could not get it to work and left it. |
hansl, could you please confirm that this feature works as it should? Maybe we need to add additional configuration somewhere? |
@andrii-oleksyshyn this is a scenario that we test for and support. See https://github.com/angular/angular-cli/blob/master/tests/e2e/tests/build/ts-paths.ts for an example. Make your you're changing the right tsconfig, in this case |
I tried adding the paths option to my tsconfig.app.json file, but when I then run 'ng build', it will hang and eventually crash with a heap error:
This is easy to duplicate. Am I aliasing my paths wrong? Is there a supported way to change the paths that gridstack is expecting? I have asked the gridstack folks to change their requires, but until they do, I'm hoping there is a way to work around this in Angular. |
@filipesilva I am changing the right Structure:
tsconfig.app.json:
Does not work with |
Same for me, using cli v1.3.0. Using My setup is:
And the tsconfig.app.json has, among other things:
But when I build, I get errors that
|
@hansl & @filipesilva, In other non-cli projects I've worked on, I've found that I need to set the |
You must set |
Is this working yet? I experienced the same problems as everyone on this thread- |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
please add support for the new TypeScript relative path shortcuts / alias in ng cli
You learn more about it here:
https://decembersoft.com/posts/say-goodbye-to-relative-paths-in-typescript-imports/
which will be awesome so we can use in angular alias paths and not have to
../../../../SomeComponent
Thanks as always for a great product,
Sean
The text was updated successfully, but these errors were encountered: