Open mrtry opened 5 years ago
Experienced this too, are there any hacks or solutions yet?
I did touch domDependencyConfig.json
and the error went away. YMMV.
That really not fix the issue, because react-native-dom still depends on native-module to be ported to the web. For the future, we need to somehow do:
react-native link
to generate dependencies for the web. react-native-web
to somehow take react-native link to use the web-version instead of native module.Isn't the list of "native modules" in dom/bootstrap.js
equivalent to what react-native link
does for the iOS and Android build systems?
Haven't got the chance to look into the issue but in short: yes
import { RNDomInstance } from "react-native-dom";
import { name as appName } from "../app.json";
// Path to RN Bundle Entrypoint ================================================
const rnBundlePath = "./entry.bundle?platform=dom&dev=true";
// React Native DOM Runtime Options =============================================
const ReactNativeDomOptions = {
enableHotReload: false,
nativeModules: []
};
// App Initialization ============================================================
const app = new RNDomInstance(
rnBundlePath,
appName,
document.body,
ReactNativeDomOptions
);
app.start();
Haven't try to do index.dom.js
to see if we can use react-native-web to do the render with non native modules, and let react-native handle gesture, yoga (flex). That would be a most optimal way for now. I could be wrong, but it is good to try it nonetheless.
I want to use
react-native-vector-icon
. Tried install, Got the following error.What is
domDependencyConfig.json
...?