Enable Fast Refresh for web (#1383)

This commit is contained in:
dan 2023-09-05 19:13:42 +01:00 committed by GitHub
parent 764c7cd569
commit 9a3fa512eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 4 deletions

View file

@ -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
}