https://github.com/completejavascript/cra-alias-demo
Demo to setup path aliases in React application with Create-react-app
https://github.com/completejavascript/cra-alias-demo
Last synced: 3 months ago
JSON representation
Demo to setup path aliases in React application with Create-react-app
- Host: GitHub
- URL: https://github.com/completejavascript/cra-alias-demo
- Owner: completejavascript
- Created: 2022-04-02T00:54:59.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-02T15:29:46.000Z (about 3 years ago)
- Last Synced: 2025-02-08T14:45:14.943Z (4 months ago)
- Language: JavaScript
- Size: 283 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Using `jsconfig.json/tsconfig.json`
Github supports setting `baseUrl` in `jsconfig.json` and `tsconfig.json`. To configure `baseUrl` to point to the `src` directory in your JavaScript project, create a `jsconfig.json` file in your project root:
```json
{
"compilerOptions": {
"baseUrl": "src"
},
"include": ["src"]
}
```If you have a TypeScript project you can configure `baseUrl` the same way in your `tsconfig.json`.
Currently the only supported options for `baseUrl` are `node_modules` (the default) and `src`.