Article From:https://segmentfault.com/q/1010000010796781
Question:

vueUse the configuration @ in webpack as the path alias and point directly to the root path, such as:

import '../../../../xxx'

Best for

import '@/styles/xxx'

To avoid such a deep relative path, how do we set the path alias in angular?


And what if it’s @import in CSS?

Answer 0:

Explanation module analysis on the official website

Answer 1:

This is the import syntax of TS. You’d better go to the official website to see import related.

Answer 2:

https://segmentfault.com/q/10…

Answer 3:

https://tslang.cn/docs/handbo…
Combined with the upstairs explanation, I think this may be more reliable.

Answer 4:

Thank you, you can see the writing of ng-alain.

Similar Posts:

Link of this Article: Angular4 how to set the path alias?

Leave a Reply

Your email address will not be published. Required fields are marked *