Disable HMR error page by default

see diff
This commit is contained in:
Travis Ralston 2021-08-25 09:57:46 -06:00
parent f8eb1d17f9
commit 219ea134ca
2 changed files with 4 additions and 1 deletions

View file

@ -48,6 +48,7 @@ module.exports = (env, argv) => {
}
const devMode = nodeEnv !== 'production';
const useHMR = process.env.CSS_HOT_RELOAD === '1' && devMode;
const fullPageErrors = process.env.FULL_PAGE_ERRORS === '1' && devMode;
const development = {};
if (argv.mode === "production") {
@ -525,7 +526,7 @@ module.exports = (env, argv) => {
new HtmlWebpackInjectPreload({
files: [{ match: /.*Inter.*\.woff2$/ }],
}),
useHMR && new ReactRefreshWebpackPlugin(),
useHMR && new ReactRefreshWebpackPlugin(fullPageErrors ? undefined : { overlay: { entry: false } }),
].filter(Boolean),