@dcl-regenesislabs/mobile-hub 1.0.0-20602706943.commit-d13162f → 1.0.0-20603548875.commit-20d80a6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +29 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -87,6 +87,35 @@ npm run dev
87
87
  npm run build
88
88
  ```
89
89
 
90
+ ## NPM Package
91
+
92
+ This project is published to npm as `@dcl-regenesislabs/mobile-hub`. The built static files can be installed and served by any backend.
93
+
94
+ ### Publishing
95
+
96
+ The build outputs to `dist/` which includes:
97
+ - All static assets (JS, CSS, images)
98
+ - `package.json` (copied from `public/package.json`)
99
+ - `README.md` (copied during prebuild)
100
+
101
+ ```bash
102
+ # Build and publish
103
+ npm run build
104
+ cd dist
105
+ npm publish
106
+ ```
107
+
108
+ ### Serving from a Subpath
109
+
110
+ The frontend supports being served from any URL path (e.g., `/hub/`, `/app/`, or root `/`).
111
+
112
+ This is achieved via `window.__BASE_PATH__`:
113
+ 1. `index.html` contains `<script>window.__BASE_PATH__ = "";</script>`
114
+ 2. The serving backend can rewrite this to the actual base path (e.g., `"/hub"`)
115
+ 3. React Router uses this as its `basename` prop
116
+
117
+ See [mobile-bff](https://github.com/decentraland/mobile-bff) for an example of serving this package with path rewriting.
118
+
90
119
  ## Environment Variables
91
120
 
92
121
  Set `VITE_REACT_APP_DCL_DEFAULT_ENV` to control the environment:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl-regenesislabs/mobile-hub",
3
- "version": "1.0.0-20602706943.commit-d13162f",
3
+ "version": "1.0.0-20603548875.commit-20d80a6",
4
4
  "description": "Mobile Hub",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,6 +17,6 @@
17
17
  "type": "git",
18
18
  "url": "git+https://github.com/decentraland/mobile-hub.git"
19
19
  },
20
- "homepage": "",
21
- "commit": "d13162f08dc754d0166b1bf5eb35884809a6baf0"
20
+ "homepage": "https://cdn.decentraland.org/@dcl-regenesislabs/mobile-hub/1.0.0-20603548875.commit-20d80a6",
21
+ "commit": "20d80a68c80c0b8bc3fe470f346757bbfd336b64"
22
22
  }