You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2022. It is now read-only.
Support for custom bundle location via JS_RUNTIME_TARGET_BUNDLE (#117)
* Support for custom bundle location via `JS_RUNTIME_TARGET_BUNDLE`
* 📚 about custom bundle location
* 📚 how to unset custom bundle path
* Upgrade to inner buildpack with improved custom bundle UX
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,6 +186,10 @@ The default `static.json`, if it does not exist in the repo, is:
186
186
{ "root": "build/" }
187
187
```
188
188
189
+
### Changing the root
190
+
191
+
If a different web server `"root"` is specified, such as with a highly customized, ejected create-react-app project, then the new bundle location may need to be [set to enable runtime environment variables](#user-content-custom-bundle-location).
192
+
189
193
### Routing clean URLs
190
194
191
195
[React Router](https://github.com/ReactTraining/react-router) (not included) may easily use hash-based URLs like `https://example.com/index.html#/users/me/edit`. This is nice & easy when getting started with local development, but for a public app you probably want real URLs like `https://example.com/users/me/edit`.
@@ -373,6 +377,22 @@ class App extends Component {
373
377
374
378
⚠️ *Avoid setting backslash escape sequences, such as `\n`, into Runtime config vars. Use literal UTF-8 values only; they will be automatically escaped.*
375
379
380
+
#### Custom bundle location
381
+
382
+
If the javascript bundle location is customized, such as with an ejected created-react-app project, then the runtime may not be able to locate the bundle to inject runtime variables.
383
+
384
+
To solve this so the runtime can locate the bundle, set the custom bundle path:
0 commit comments