{
"compilerOptions" : {
"baseUrl": "./src",
"paths": {
"@components": [
"components/index"
],
"@containers": [
"containers/index"
],
"@cores": [
"cores/index"
],
"@pages": [
"pages/index"
],
"@redux": [
"redux/index"
],
"@selectors": [
"selectors/index"
],
"@styles": [
"styles/index"
],
"@utils": [
"utils/index"
],
"@components/*": [
"components/*"
],
"@containers/*": [
"containers/*"
],
"@cores/*": [
"cores/*"
],
"@pages/*": [
"pages/*"
],
"@redux/*": [
"redux/*"
],
"@selectors/*": [
"selectors/*"
],
"@styles/*": [
"styles/*"
],
"@utils/*": [
"utils/*"
]
}
}
}
// Some code
# Using npm
npm install @craco/craco
npm install -D craco-alias
# Using yarn
yarn add @craco/craco
yarn add -D craco-alias
const CracoAlias = require('craco-alias')
module.exports = {
plugins: [
{
plugin: CracoAlias,
options: {
source: 'tsconfig',
baseUrl: './src',
tsConfigPath: './tsconfig.paths.json',
},
},
],
}
"start": "craco start",
"build": "craco build"
"extends": "./tsconfig.paths.json",
"include": [
"craco.config.js"
]