docs: added beta features documentation (#4859)

This commit is contained in:
Shahed Nasser
2023-08-25 14:59:20 +03:00
committed by GitHub
parent 7aaa332a32
commit 6d94c0c181
4 changed files with 132 additions and 5 deletions
@@ -25,21 +25,21 @@ There are two ways to enable a feature flag.
### Method One: Using Environment Variables
You can enable a feature by setting the value of its environment variable to `true`. You can find [the name of a feature flags environment variable in the loader file](https://github.com/medusajs/medusa/tree/master/packages/medusa/src/loaders/feature-flags) its defined in. It is defined under the property `env_key` in the exported object.
You can enable a feature by setting the value of its environment variable to `true`. You can find [the name of a feature flags environment variable in the Beta Features documentation page](../../beta.md).
For example, to enable the Tax-Inclusive Pricing beta feature, add the following environment variable:
```jsx
```bash
MEDUSA_FF_TAX_INCLUSIVE_PRICING=true
```
### Method Two: Using Backend Configurations
You can enable a feature by using the backend configurations in `medusa-config.js`. You can find [a feature flags key in the loader file](https://github.com/medusajs/medusa/tree/master/packages/medusa/src/loaders/feature-flags) its defined in. It is defined under the property `key` in the exported object.
You can enable a feature by using the backend configurations in `medusa-config.js`. You can find [the feature flags key in the Beta Features documentation page](../../beta.md) its defined in. It is defined under the property `key` in the exported object.
For example, to enable the Tax-Inclusive Pricing beta feature, add the following to the exported object in `medusa-config.js`:
```jsx title=medusa-config.js
```js title=medusa-config.js
module.exports = {
featureFlags: {
tax_inclusive_pricing: true,