diff --git a/public/react/.env b/public/react/.env
new file mode 100644
index 000000000..4f79a0f8e
--- /dev/null
+++ b/public/react/.env
@@ -0,0 +1 @@
+GENERATE_SOURCEMAP=false
\ No newline at end of file
diff --git a/public/react/.gitignore b/public/react/.gitignore
index 4d29575de..2a5bc17a2 100644
--- a/public/react/.gitignore
+++ b/public/react/.gitignore
@@ -10,7 +10,7 @@
# production
/build
-
+/dist
# misc
.DS_Store
.env.local
diff --git a/public/react/config-overrides.js b/public/react/config-overrides.js
index 487fbfbbf..4a7362280 100644
--- a/public/react/config-overrides.js
+++ b/public/react/config-overrides.js
@@ -8,9 +8,54 @@ const {
addWebpackPlugin
} = require("customize-cra")
+
const path = require('path');
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
-const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
+const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin')
+const HardSourceWebpackPlugin = require('hard-source-webpack-plugin')
+
+let instance = new HardSourceWebpackPlugin({
+ // Either an absolute path or relative to webpack's options.context.
+ cacheDirectory: 'node_modules/.cache/hard-source/[confighash]',
+ // Either a string of object hash function given a webpack config.
+ configHash: function (webpackConfig) {
+ // node-object-hash on npm can be used to build this.
+ return require('node-object-hash')({ sort: false }).hash(webpackConfig);
+ },
+ // Either false, a string, an object, or a project hashing function.
+ environmentHash: {
+ root: process.cwd(),
+ directories: [],
+ files: ['package-lock.json', 'yarn.lock'],
+ },// How to launch the extra processes. Default:
+ fork: (fork, compiler, webpackBin) => fork(
+ webpackBin(),
+ ['--config', __filename], {
+ silent: true,
+ }
+ ),
+ // Number of workers to spawn. Default:
+ numWorkers: () => require('os').cpus().length,
+ // Number of modules built before launching parallel building. Default:
+ minModules: 10,
+ // An object.
+ info: {
+ // 'none' or 'test'.
+ mode: 'none',
+ // 'debug', 'log', 'info', 'warn', or 'error'.
+ level: 'debug',
+ },
+ // Clean up large, old caches automatically.
+ cachePrune: {
+ // Caches younger than `maxAge` are not considered for deletion. They must
+ // be at least this (default: 2 days) old in milliseconds.
+ maxAge: 2 * 24 * 60 * 60 * 1000,
+ // All caches together must be larger than `sizeThreshold` before any
+ // caches will be deleted. Together they must be at least this
+ // (default: 50 MB) big in bytes.
+ sizeThreshold: 50 * 1024 * 1024
+ },
+})
module.exports = override(
disableEsLint(),
@@ -27,6 +72,7 @@ module.exports = override(
style: true
}),
addWebpackPlugin(new MonacoWebpackPlugin({})),
+ addWebpackPlugin(instance),
(config) => {
config.resolve.plugins = config.resolve.plugins.filter(plugin => !(plugin instanceof ModuleScopePlugin));
if (process.env.NODE_ENV !== "development") {
diff --git a/public/react/dist/report.html b/public/react/dist/report.html
index 71f7c738f..a3257ae1f 100644
--- a/public/react/dist/report.html
+++ b/public/react/dist/report.html
@@ -3,7 +3,7 @@