From 9a3fa512ebcbf9e0b539dd337db967017b626826 Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 5 Sep 2023 19:13:42 +0100 Subject: Enable Fast Refresh for web (#1383) --- webpack.config.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js index 28e5ca0db..7515db8e9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,6 @@ const createExpoWebpackConfigAsync = require('@expo/webpack-config') const {withAlias} = require('@expo/webpack-config/addons') +const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin') const reactNativeWebWebviewConfiguration = { test: /postMock.html$/, @@ -22,5 +23,8 @@ module.exports = async function (env, argv) { ...(config.module.rules || []), reactNativeWebWebviewConfiguration, ] + if (env.mode === 'development') { + config.plugins.push(new ReactRefreshWebpackPlugin()) + } return config } -- cgit 1.4.1