-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathconfig-overrides.js
46 lines (46 loc) · 1.51 KB
/
config-overrides.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
const path = require('path');
const {
override,
addPostcssPlugins
} = require('customize-cra');
module.exports = {
paths: function (paths, env) {
paths.appSrc = path.resolve(__dirname, 'src/main/react');
paths.appIndexJs = path.resolve(__dirname, 'src/main/react/index.js');
paths.appPublic = path.resolve(__dirname, 'src/main/resources/public');
paths.appHtml = path.resolve(__dirname, 'src/main/resources/public/index.html');
paths.appBuild = path.resolve(__dirname, 'target/classes/public');
return paths;
},
jest: function(config) {
config.rootDir = path.resolve(__dirname, 'src/main/react');
config.roots = [
'<rootDir>'
];
config.setupFilesAfterEnv = [
'<rootDir>/setupTests.js'
];
config.transformIgnorePatterns = [
'<rootDir>/node_modules/',
'\\.pnp\\.[^\\\/]+$'
];
config.testMatch = [
'<rootDir>/**/__tests__/**/*.{js,jsx,ts,tsx}',
'<rootDir>/**/*.{spec,test}.{js,jsx,ts,tsx}'
];
config.collectCoverage = true;
config.collectCoverageFrom = [
'**/*.{js,jsx,ts,tsx}',
'!**/*.d.ts',
'!index.{js,jsx,ts,tsx}',
];
config.coverageDirectory = path.resolve(__dirname, 'coverage');
return config;
},
webpack: override(
addPostcssPlugins([
require('tailwindcss'),
require('autoprefixer')
])
)
}