how to not use relative imports in react js

Solutions on MaxInterview for how to not use relative imports in react js by the best coders in the world

showing results for - "how to not use relative imports in react js"
Aidan
28 Apr 2018
1// create a jsconfig.json file in your root dir(where package.json is located) and add this:
2{
3  "compilerOptions": {
4    "baseUrl": "src"
5  }
6}
Micaela
16 Feb 2017
1// create an .env file in the project's root dir(where package.json is located) and add
2NODE_PATH=src
3// and if this does not work try
4NODE_PATH=./src
queries leading to this page
module not found 3a error 3a can 27t resolve 27react 27 src webpackmodule not found 3a error 3a can 27t resolve 27 2fsrc 27 2fsrc 2findex js module not found 3a can 27t resolve 27react router dom 27 in 27d 3a 5cproject itp 5cmini theatre management 5csrc 27 2fsrc 2fapp js module not found 3a can 27t resolve 27react router dom 27 in 27 2fusers 2fravianand 2fdesktop 2fpep web11 2fmovies 2fsrc 27 2fsrc 2findex js module not found 3a can 27t resolve 27react redux 27 in 27x 3a 5cboot 2breact 5creactchat 5csrc 27 2fsrc 2findex js module not found 3a can 27t resolve 27 2fapp 27 in 27e 3a 5creact js 5ckeeper project 5csrc 27react import without relative path 2fsrc 2fapp js module not found 3a can 27t resolve 27src 2fpages 2fmainpage 27 in 2fsrc 2fapp js module not found 3a can 27t resolve 27 2freact 27 in 27c 3a 5cusers 5cuser 5cdesktop 5capp 5capp 5csrc 27relative imports in react 2fsrc 2fapp js module not found 3a can 27t resolve 27react router dom 27 in 27 2fusers 2fmac 2fdocuments 2fdevfrontall 2fzangl 2fsrc 27 create react app relative importshow to import without relative path react 2fsrc 2fapp js module not found 3a can 27t resolve 27 2fcomponents 2fregister 27module not found 3a error 3a can 27t resolve 27 40angular 2fcore 2fsrc 2frender3 27how to avoid relative import error javascript react 2fsrc 2fapp js module not found 3a can 27t resolverelative import react 2fsrc 2fabout js module not found 3a can 27t resolvehow to not use relative imports in react jserror in main module not found 3a error 3a can 27t resolve 27 2fsrc 27 2fsrc 2fapp js module not found 3a can 27t resolve 27react router dom 27 in 27d 3a 5creact practise 5csubmissions 5csrc 27relative imports reactrelative import in reacthow can 2fsrc 2fapp js module not found 3a can 27t resolve 3fmodule not found 3a error 3a can 27t resolve 27react 27 src 2fsrc 2fapp js module not found 3a can 27t resolve 27components 27 inmodule not found 3a can 27t resolve 27react images uploading 27relative import reactjs 2fsrc 2fapp js module not found 3a can 27t resolve 27react router dom 27how to not use relative imports in react js