-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcraco.config.js
63 lines (62 loc) · 1.86 KB
/
craco.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
const path = require(`path`);
const { pathsToModuleNameMapper } = require(`ts-jest`);
const { compilerOptions } = require(`./tsconfig.path.json`);
module.exports = {
webpack: {
alias: {
'@src': path.resolve(__dirname, `src`),
'@api': path.resolve(__dirname, `src/domains/api`),
'@errors-api': path.resolve(
__dirname,
`src/domains/errors/api-error-module`,
),
'@errors-ui': path.resolve(
__dirname,
`src/domains/errors/ui-error-module`,
),
'@ui-factories': path.resolve(
__dirname,
`src/domains/repository-search-ui/factories`,
),
'@ui-adapters': path.resolve(
__dirname,
`src/domains/repository-search-ui/adapters`,
),
'@ui-components': path.resolve(
__dirname,
`src/domains/repository-search-ui/components`,
),
'@ui-async-models': path.resolve(
__dirname,
`src/domains/repository-search-ui/models/async-models`,
),
'@ui-constants': path.resolve(
__dirname,
`src/domains/repository-search-ui/models/constants`,
),
'@ui-entities': path.resolve(
__dirname,
`src/domains/repository-search-ui/models/entities`,
),
'@ui-transformations': path.resolve(
__dirname,
`src/domains/repository-search-ui/models/transformations`,
),
'@ui-value-objects': path.resolve(
__dirname,
`src/domains/repository-search-ui/models/value-objects`,
),
'@ui': path.resolve(__dirname, `src/domains/repository-search-ui`),
'@test': path.resolve(__dirname, `src/test-utils`),
'@utils': path.resolve(__dirname, `src/utils`),
},
},
jest: {
configure: {
preset: `ts-jest`,
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: `<rootDir>/`,
}),
},
},
};