Closed bori87 closed 7 years ago
The tilde on an import will signify importing a module from node_modules
, not your app directory. You should be able to create a webpack alias and import from app/common
, assuming you have an index.ts
in that file location.
Take a peak at this issue for more information: https://github.com/angular/angular-cli/issues/5031
Let me know if that help resolves your question.
Currently the tsconfig we have for ~ is set to recognize ~/ in webpack. Perhaps this should not include the / though?
I am trying to set up an alias for my common module directory. I want import { RouterModule } from '~app/common'; instead of import { RouterModule } from '../common'; How can i achieve this? I have tried to add alias in webpack.config.js but compiler is looking for module relative to "app/tns_modules/".