♨️ Hot-swap A-Frame React components in place without browser refresh
see react-transform-boilerplate
Demo: http://meta-meta.github.io/aframe-react-transform-boilerplate/
git clone https://github.com/meta-meta/aframe-react-transform-boilerplate.git my-aframe-react-project
cd my-aframe-react-project
git submodule update --init
cd aframe
npm install
cd ..
cd aframe-react
npm install
cd ..
npm install
npm start
open http://localhost:8080
📱 Mobile pro tip: Upon starting the development server, the URL will be logged to the console. Load that URL from a browser on your mobile device. (If your mobile phone and computer are not on the same LAN, consider using ngrok for local development and testing. Browsersync is also worth a gander.)
With Webpack's ES6 module syntax:
import {aframeCore} from 'aframe';
import exampleComponent from 'aframe-example-component';
aframeCore.registerComponent('example', exampleComponent.component);
Update package.json with the url for your repo:
"repository": "https://github.com/my-github-username/my-repo.git"
Run:
npm run ghpages