forked from ventureum/Chainsfr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig-overrides.js
More file actions
35 lines (32 loc) · 1.01 KB
/
Copy pathconfig-overrides.js
File metadata and controls
35 lines (32 loc) · 1.01 KB
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
/* eslint-disable */
var path = require('path')
const WorkerPlugin = require('worker-plugin')
module.exports = {
// The Webpack config to use when compiling your react app for development or production.
webpack: function(config, env) {
// ...add your webpack config
// suppress grpc warnings
config.module.exprContextCritical = false
// remove hot-loader
if (process.env.REACT_APP_HOT_LOADING === 'false') {
config.entry = config.entry.filter(e => !e.endsWith('webpackHotDevClient.js'))
}
if (!config.plugins) {
config.plugins = [];
}
config.plugins.push(new WorkerPlugin())
config.output = {
...config.output,
path: path.join(__dirname, 'build'),
filename: 'bundle.js',
globalObject: 'this',
}
return config;
},
// The Jest config to use when running your jest tests - note that the normal rewires do not
// work here.
jest: function(config) {
config.transformIgnorePatterns = ["node_modules/(?!(@atlaskit)/)"]
return config;
}
}