diff options
author | dan <dan.abramov@gmail.com> | 2023-09-05 19:13:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 11:13:42 -0700 |
commit | 9a3fa512ebcbf9e0b539dd337db967017b626826 (patch) | |
tree | 5463f970cbbb7e5192ddfbba26db68e7416905d2 /webpack.config.js | |
parent | 764c7cd5694a41c98d8543b68d7791fa90db4291 (diff) | |
download | voidsky-9a3fa512ebcbf9e0b539dd337db967017b626826.tar.zst |
Enable Fast Refresh for web (#1383)
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 4 |
1 files changed, 4 insertions, 0 deletions
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 } |