When compiling Soapbox FE, environment variables may be passed to change the build itself. For example:
NODE_ENV="production" FE_BUILD_DIR="public" FE_SUBDIRECTORY="/soapbox" yarn build
The environment to build Soapbox FE for.
"production"- For live sites
"development"- For local development
"test"- Bootstraps test environment
It's recommended to always build in
"production" mode for live sites.
The base URL for API calls. You only need to set this if Soapbox FE is hosted in a different place than the backend.
- An absolute URL, eg
- Empty string (
The folder to put build files in. This is mostly useful for CI tasks like GitLab Pages.
- Any directory name, eg
Subdirectory to host Soapbox FE out of.
When hosting on a subdirectory, you must create a custom build for it.
This option will set the imports in
index.html, and the basename for routes in React.
- Any path, eg
For example, if you want to host the build on
https://gleasonator.com/soapbox, you can compile it like this:
NODE_ENV="production" FE_SUBDIRECTORY="/soapbox" yarn build
Sentry endpoint for this custom build.
Sentry is an error monitoring service that may be optionally included. When an endpoint is not configured, it does nothing.
Sentry's backend was FOSS until 2019 when it moved to source-available, but a BSD-3 fork called GlitchTip may also be used.
- Endpoint URL, eg