Parametrize configurations¡
This commit is contained in:
@@ -16,5 +16,9 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export const API_BASE = import.meta.env.VITE_API_BASE || 'http://localhost:8000';
|
||||
const baseUrl = import.meta.env.BASE_URL || '/';
|
||||
const defaultApiBase = `${baseUrl.replace(/\/$/, '')}/api`;
|
||||
const rawApiBase = import.meta.env.VITE_API_BASE || defaultApiBase;
|
||||
|
||||
export const API_BASE = rawApiBase.replace(/\/$/, '');
|
||||
export const ENABLE_POLLING = import.meta.env.MODE !== 'test';
|
||||
|
||||
Reference in New Issue
Block a user