Import XX from "@ XXX" in react. How and where to configure this @.

RT, wants to configure @ to a set directory and ask for help.

import XX from "@ XXX" in react. How to configure this @ and where to configure it?

Oct.27,2021

In the configuration file of

webpack, that is, in the file that sets entry and output, there is a resolve configuration item, in which setting alias, means setting path aliases to reduce path complexity
. In the following example, I set two path aliases, @ and Static

.
  configure @ in alias  

Menu