Skip to content

Commit

Permalink
fix(framework): add missing storefrontUrl from configuration type (#1…
Browse files Browse the repository at this point in the history
…1511)

The `storefrontUrl` is defined in the `packages/core/types/src/common/config-module.ts` file, but for many purposes, including the documentation, we use the types defined in `packages/core/framework/src/config/types.ts`. This PR adds the `storefrontUrl` to the framework type
  • Loading branch information
shahednasser authored Feb 18, 2025
1 parent 062805d commit b60e1c8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/dull-tigers-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/framework": patch
---

fix(framework): add missing storefrontUrl from configuration type
26 changes: 25 additions & 1 deletion packages/core/framework/src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,24 @@ export type AdminOptions = {
* ```
*/
backendUrl?: string
/**
* The URL of your Medusa storefront application. This URL is used as a prefix to some
* links in the admin that require performing actions in the storefront. For example,
* this URL is used as a prefix to shareable payment links for orders with
* outstanding amounts.
*
* @example
* ```js title="medusa-config.js"
* module.exports = defineConfig({
* admin: {
* storefrontUrl: process.env.MEDUSA_STOREFRONT_URL ||
* "http://localhost:8000"
* },
* // ...
* })
* ```
*/
storefrontUrl?: string
/**
* Configure the Vite configuration for the admin dashboard. This function receives the default Vite configuration
* and returns the modified configuration. The default value is `undefined`.
Expand Down Expand Up @@ -771,7 +789,13 @@ export type ProjectConfigOptions = {
/**
* @interface
*
* The configurations for your Medusa application are in `medusa-config.ts` located in the root of your Medusa project. The configurations include configurations for database, modules, and more.
* The configurations for your Medusa application are set in `medusa-config.ts` located in the root of your Medusa project. The configurations include configurations for database, modules, and more.
*
* :::note
*
* Some Medusa configurations are set through environment variables, which you can find in [this documentation](https://docs.medusajs.com/learn/fundamentals/environment-variables#predefined-medusa-environment-variables).
*
* :::
*
* `medusa-config.ts` exports the value returned by the `defineConfig` utility function imported from `@medusajs/framework/utils`.
*
Expand Down

0 comments on commit b60e1c8

Please sign in to comment.