Open rgal75 opened 6 years ago
Yeah, I noticed that but I still didn't have the time to investigate. I will probably start migrating the whole Ionic2CLI-meteor tutorial to angularcli in a couple of weeks, so I will have a look.
@rgal75 I think you should remove baseUrl from src/tsconfig.app.json file.
@mucahittekin I tried that but unfortunately it does not work.
First of all: let's remove declare module '*'
from src/declarations.d.ts
which hides useful warnings for no reason.
The issue is that webpack aliases do not work with angular-cli and I don't know why. They had their own solution with awesome-typescript-loader, but they now removed it to switch to AotPlugin
from @ngtools/webpack
.
Unfortunately I still didn't manage to make it work: https://github.com/angular/angular-cli/issues/1465#issuecomment-337235127
For the moment I simply removed the alias and used relative paths.
This is what I also ended up eventually.
Starting out from the project at master, I tried to add some more features and found that if I start using interface types then webpack is complaining that it cannot find the interface.
How to reproduce:
angularcli-meteor
project atmaster
app.component.ts
at line 17, add the correct typing (Chat
) to the callback parameter. (TheChat
interface is already imported.)npm run start
Result:
ERROR in .../angularcli-meteor-master/src/app/app.component.ts (17,38): Cannot find name 'Chat'.
Note
Thanks for your efforts to create this boilerplate. It's really useful.