From a4d3caeb6bd3884fe8baf833f74313402ee4485b Mon Sep 17 00:00:00 2001 From: R2m1liA <15258427350@163.com> Date: Fri, 26 Sep 2025 17:28:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将nuxt.config.ts中的strapi配置移至runtimeConfig中 --- nuxt.config.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index 3e65fea..a811eb4 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -29,6 +29,15 @@ export default defineNuxtConfig({ : process.env.MEILI_SEARCH_INDEXES : ['production', 'solution'], }, + strapi: { + url: process.env.STRAPI_URL || 'http://localhost:1337', + token: process.env.STRAPI_TOKEN || undefined, + prefix: '/api', + admin: '/admin', + version: 'v5', + cookie: {}, + cookieName: 'strapi_jwt', + }, }, }, @@ -104,16 +113,6 @@ export default defineNuxtConfig({ langDir: 'locales', }, - strapi: { - url: process.env.STRAPI_URL || 'http://localhost:1337', - token: process.env.STRAPI_TOKEN || undefined, - prefix: '/api', - admin: '/admin', - version: 'v5', - cookie: {}, - cookieName: 'strapi_jwt', - }, - imports: { dirs: ['types/**'], }, -- 2.49.0