From a7e216228861874b248f18d270881a5f576cb233 Mon Sep 17 00:00:00 2001 From: fantasticit Date: Sat, 26 Mar 2022 22:02:26 +0800 Subject: [PATCH] fix: fix get config in client --- packages/client/next.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/next.config.js b/packages/client/next.config.js index b2307d3..ea4a5c7 100644 --- a/packages/client/next.config.js +++ b/packages/client/next.config.js @@ -1,14 +1,14 @@ const semi = require('@douyinfe/semi-next').default({}); const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); const { getConfig } = require('@think/config'); -const config = getConfig().client; +const config = getConfig(); /** @type {import('next').NextConfig} */ const nextConfig = semi({ assetPrefix: config.assetPrefix, env: { - SERVER_API_URL: config.apiUrl, - COLLABORATION_API_URL: config.collaborationUrl, + SERVER_API_URL: config?.client?.apiUrl, + COLLABORATION_API_URL: config?.client?.collaborationUrl, ENABLE_ALIYUN_OSS: !!config?.oss?.aliyun?.accessKeyId, }, webpack: (config, { dev, isServer }) => {