Enable Fast Refresh for web (#1383)
This commit is contained in:
parent
764c7cd569
commit
9a3fa512eb
3 changed files with 26 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue