mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-06 22:37:14 +08:00
Add HMRLoadingView module for web target (#23389)
Summary: * Added a default value for HMRLoadingView this will prevent errors from being thrown when `HMRClient` attempts to include it in a `web` context. * [Web] [Added] - HMRLoadingView Pull Request resolved: https://github.com/facebook/react-native/pull/23389 Differential Revision: D14045475 Pulled By: cpojer fbshipit-source-id: df5c3cf3536af3b37eaf82342b6346bc25054319
This commit is contained in:
committed by
Facebook Github Bot
parent
b0c69aba1d
commit
104b1f9367
@@ -26,6 +26,9 @@
|
||||
; require from fbjs/lib instead: require('fbjs/lib/warning')
|
||||
.*/node_modules/warning/.*
|
||||
|
||||
; Flow doesn't support platforms
|
||||
.*/Libraries/Utilities/HMRLoadingView.js
|
||||
|
||||
[untyped]
|
||||
.*/node_modules/@react-native-community/cli/.*/.*
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
; require from fbjs/lib instead: require('fbjs/lib/warning')
|
||||
.*/node_modules/warning/.*
|
||||
|
||||
; Flow doesn't support platforms
|
||||
.*/Libraries/Utilities/HMRLoadingView.js
|
||||
|
||||
[untyped]
|
||||
.*/node_modules/@react-native-community/cli/.*/.*
|
||||
|
||||
|
||||
23
Libraries/Utilities/HMRLoadingView.js
Normal file
23
Libraries/Utilities/HMRLoadingView.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
* @flow strict-local
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
class HMRLoadingView {
|
||||
static showMessage(message: string) {
|
||||
// noop
|
||||
}
|
||||
|
||||
static hide() {
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = HMRLoadingView;
|
||||
Reference in New Issue
Block a user