Files
Message-Push-Nest/web/config.js
T
2026-01-15 20:05:00 +08:00

17 lines
363 B
JavaScript

// config.js
const isProduction = process.env.NODE_ENV === 'prod';
// 从 window 对象获取路径前缀(由后端注入或通过 API 获取)
const getPathPrefix = () => {
return window.__URL_PATH_PREFIX__ || '';
};
const config = {
apiUrl: isProduction ? '' : 'http://localhost:8000',
pathPrefix: getPathPrefix(),
};
export default config;