fix(admin-next,types): fixes order page from breaking in admin server (#8730)

This commit is contained in:
Riqwan Thamir
2024-08-23 08:07:04 +02:00
committed by GitHub
parent f9749c5df6
commit 02c6574e01
5 changed files with 39 additions and 18 deletions

View File

@@ -18,6 +18,7 @@ export async function getViteConfig(
const root = path.resolve(__dirname, "./")
const backendUrl = options.backendUrl ?? ""
const storefrontUrl = options.storefrontUrl ?? ""
const baseConfig: InlineConfig = {
root,
@@ -33,6 +34,7 @@ export async function getViteConfig(
define: {
__BASE__: JSON.stringify(options.path),
__BACKEND_URL__: JSON.stringify(backendUrl),
__STOREFRONT_URL__: JSON.stringify(storefrontUrl),
},
server: {
fs: {

View File

@@ -1,6 +1,6 @@
import { AdminOptions } from "@medusajs/types"
export type BundlerOptions = Required<Pick<AdminOptions, "outDir" | "path">> &
Pick<AdminOptions, "vite" | "backendUrl"> & {
Pick<AdminOptions, "vite" | "backendUrl" | "storefrontUrl"> & {
sources?: string[]
}