After freshly run create-react-app demo
cd ./demo
npm start
Then modify App.css.
Console shows
Failed to compile.
Error in ./src/App.js
Module not found: Error: Cannot resolve module 'react-native-web' in /Users/jack/workspace/js/react/demo/src
@ ./src/App.js 7:19-42
And my App.js mysteriously becomes
importReact,{StyleSheet,Dimensions,PixelRatio}from"react-native";const{width, height, scale}=Dimensions.get("window"),vw=width/100,vh=height/100,vmin=Math.min(vw,vh),vmax=Math.max(vw,vh);exportdefaultStyleSheet.create({"App": {"textAlign": "center"},"App-logo": {"animation": "App-logo-spin infinite 20s linear","height": 80},"App-header": {"backgroundColor": "#222","height": 150,"paddingTop": 20,"paddingRight": 20,"paddingBottom": 20,"paddingLeft": 20,"color": "red"},"App-intro": {"fontSize": "large"}});Using create-react-app v0.3.0
(This persists after I updated react-scripts to v0.4.1)
After freshly run
create-react-app democd ./demonpm startThen modify
App.css.Console shows
And my App.js mysteriously becomes
Using create-react-app v0.3.0
(This persists after I updated react-scripts to v0.4.1)