天天看點

react項目中import使用絕對路徑

在項目的根目錄下建立​

​jsconfig.json​

​檔案

{
  "compilerOptions": {
    "baseUrl": "src"
  },
  "include": ["src"]
}      

重新開機項目

使用