How to avoid using relative path imports (/../../../redux/action/action1) in create-react-app

前端 未结 7 616
太阳男子
太阳男子 2020-12-07 18:21

I\'ve been using create-react-app package for creating a react website. I was using relative paths throughout my app for importing components, resources, redux etc. eg,

7条回答
  •  青春惊慌失措
    2020-12-07 19:01

    I am using babel-plugin-module-resolver for my project to resolve that problem. babel-plugin-module-resolver also is the same as module-alis. So I think you should just resolve using module-alis problem.

    Because you didn't tell us why using module-alis was fail? So i cant show you how to fix it.

    Dont give up your solution while you dont know the reason!

提交回复
热议问题