An open API service indexing awesome lists of open source software.

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

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`.