Initialize repo:
pnpm i
Start development version:
pnpm dev
-
Run an instance of a component server like near/bos-loader which serves component code in the following format
{ "components": { "<component path 1>": { "code": "<component 1 code>" }, "<component path 2>": { "code": "<component 2 code>" } } }
this will be used as a
redirectMap
inViewPage
-
Open the
/flags
route of your viewer and set the BOS Loader URL e.g.http://127.0.0.1:3030
Note: there is no hot reload, you must refresh the page to see component changes
This section needs testing since switch to pnpm
If you need to make changes to the VM and test locally, you can easily link your local copy of the VM:
- Clone the VM repo as a sibling of
near-discovery
:
git clone git@github.com:NearSocial/VM.git
Folder Structure:
/near-discovery
/VM
-
Run
pnpm link ../VM
-
Any time you make changes to the
VM
, runpnpm build
inside theVM
project in order for the viewer project to pick up the changes