forked from inveniosoftware/react-invenio-app-ils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
craco.config.js
42 lines (41 loc) · 1.6 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
const { ESLINT_MODES } = require('@craco/craco');
var path = require('path');
module.exports = {
plugins: [{ plugin: require('@semantic-ui-react/craco-less') }],
eslint: {
enable: true /* (default value) */,
useEslintrc: true,
mode: ESLINT_MODES.file,
},
webpack: {
alias: {
'@api': path.resolve(__dirname, 'src/lib/api'),
'@authentication': path.resolve(__dirname, 'src/lib/authentication/'),
'@components': path.resolve(__dirname, 'src/lib/components/'),
'@config': path.resolve(__dirname, 'src/lib/config/'),
'@forms': path.resolve(__dirname, 'src/lib/forms/'),
'@modules': path.resolve(__dirname, 'src/lib/modules'),
'@pages': path.resolve(__dirname, 'src/lib/pages/'),
'@routes': path.resolve(__dirname, 'src/lib/routes/'),
'@history': path.resolve(__dirname, 'src/lib/history/'),
'@theme': path.resolve(__dirname, 'src/semantic-ui/'),
},
},
jest: {
configure: {
moduleNameMapper: {
'^@api(.*)$': '<rootDir>/src/lib/api$1',
'^@authentication(.*)$': '<rootDir>/src/lib/authentication$1',
'^@components(.*)$': '<rootDir>/src/lib/components$1',
'^@config(.*)$': '<rootDir>/src/lib/config$1',
'^@forms(.*)$': '<rootDir>/src/lib/forms$1',
'^@modules(.*)$': '<rootDir>/src/lib/modules$1',
'^@pages(.*)$': '<rootDir>/src/lib/pages$1',
'^@routes(.*)$': '<rootDir>/src/lib/routes$1',
'^@history(.*)$': '<rootDir>/src/lib/history$1',
'^@theme(.*)$': '<rootDir>/src/semantic-ui$1',
'^@testData(.*)$': '<rootDir>/src/testData$1',
},
},
},
};