fix admin import config

This commit is contained in:
einhornimmond 2025-05-06 11:38:15 +02:00
parent f7d556b9d4
commit 106bdf019a
3 changed files with 6 additions and 7 deletions

View File

@ -2,7 +2,7 @@
// The whole contents is exposed to the client
// Load Package Details for some default values
const pkg = require('../../package')
import pkg from '../../package'
const version = {
ADMIN_MODULE_PROTOCOL: process.env.ADMIN_MODULE_PROTOCOL ?? 'http',

View File

@ -1,4 +1,4 @@
const {
import {
APP_VERSION,
BUILD_COMMIT,
BUILD_COMMIT_SHORT,
@ -10,8 +10,8 @@ const {
NODE_ENV,
OPENAI_ACTIVE,
PRODUCTION,
} = require('config-schema')
const Joi = require('joi')
} from 'config-schema'
import Joi from 'joi'
module.exports = Joi.object({
APP_VERSION,

View File

@ -7,18 +7,17 @@ import IconsResolve from 'unplugin-icons/resolver'
import { BootstrapVueNextResolver } from 'bootstrap-vue-next'
import EnvironmentPlugin from 'vite-plugin-environment'
import schema from './src/config/schema'
import CONFIG from './src/config'
import { execSync } from 'node:child_process'
import { existsSync, constants } from 'node:fs'
import { validate, browserUrls } from 'config-schema'
import path from 'node:path'
import path from 'node:path'
import dotenv from 'dotenv'
dotenv.config() // load env vars from .env
const CONFIG = require('./src/config')
export default defineConfig(async ({ command }) => {
const { vitePluginGraphqlLoader } = await import('vite-plugin-graphql-loader')
if (command === 'serve') {