forked from OasisDEX/mcd-cdp-portal
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcraco.config.js
46 lines (45 loc) · 1.18 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
const alias = {};
if (process.env.NODE_ENV === 'development') {
alias['react-dom'] = '@hot-loader/react-dom';
}
module.exports = {
webpack: {
alias,
plugins: [
process.env.NODE_ENV === 'production'
? new (require('webpack-bundle-analyzer')).BundleAnalyzerPlugin({
analyzerMode: 'static',
reportFilename: './report.html'
})
: () => {}
],
configure: {
output: {
path: require('path').resolve(__dirname, 'build/')
},
// TODO: Remove once the scrypt.js "Critical dependency: the request of a dependency is an expression" issue is resolved
// See: https://github.com/ethereum/web3.js/issues/3018
module: {
exprContextCritical: false
}
},
devServer: {
hot: true
}
},
babel: {
plugins: [
'styled-components',
'react-hot-loader/babel',
'@babel/plugin-proposal-optional-chaining',
['@babel/plugin-proposal-decorators', { legacy: true }]
]
},
jest: {
configure: {
coverageReporters: ['json', 'lcov', 'text-summary'],
setupFilesAfterEnv: '<rootDir>/test/setup.js',
collectCoverageFrom: ['src/**/*.js']
}
}
};