Guest User

Untitled

a guest
Nov 20th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. ### jsconfig.json
  2. ```json
  3. {
  4. "compilerOptions": {
  5. "baseUrl": "./src",
  6. "target": "ES6",
  7. "jsx": "preserve",
  8. "allowSyntheticDefaultImports": true
  9. },
  10. "exclude": ["build", "node_modules"]
  11. }
  12. ```
  13.  
  14. ### .env
  15. ```
  16. NODE_PATH=src
  17. ```
  18.  
  19. ### package.json
  20. ```json
  21. {
  22. "scripts": {
  23. "start": "cross-env NODE_PATH=src react-scripts start",
  24. }
  25. }
  26. ```
  27.  
  28. ## Webstorm
  29.  
  30. 1. Mark `src` directory as **Resource Root**
  31. 2. Go to **Settings -> Editor -> Code Style -> Javascript**.
  32. 3. Switch to **Imports** tab and select **Use paths relative to the project, resource or sources root**.
Add Comment
Please, Sign In to add comment