mirror of
https://github.com/logto-io/logto.git
synced 2025-01-13 21:30:30 -05:00
6 lines
244 B
TypeScript
6 lines
244 B
TypeScript
export const getBasename = (prefix: string, developmentPort: string): string => {
|
|
const isBasenameNeeded =
|
|
process.env.NODE_ENV !== 'development' || process.env.PORT === developmentPort;
|
|
|
|
return isBasenameNeeded ? '/' + prefix : '';
|
|
};
|