Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### jsconfig.json
- ```json
- {
- "compilerOptions": {
- "baseUrl": "./src",
- "target": "ES6",
- "jsx": "preserve",
- "allowSyntheticDefaultImports": true
- },
- "exclude": ["build", "node_modules"]
- }
- ```
- ### .env
- ```
- NODE_PATH=src
- ```
- ### package.json
- ```json
- {
- "scripts": {
- "start": "cross-env NODE_PATH=src react-scripts start",
- }
- }
- ```
- ## Webstorm
- 1. Mark `src` directory as **Resource Root**
- 2. Go to **Settings -> Editor -> Code Style -> Javascript**.
- 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