fix(env): 修复构建版本无法正常获取环境变量的问题
All checks were successful
deploy to server / build-and-deploy (push) Successful in 6m41s
All checks were successful
deploy to server / build-and-deploy (push) Successful in 6m41s
- 在nuxt.config.ts中,将strapi配置项移至runnertimeConfig-public-strapi中 Issue: Fixes #29
This commit is contained in:
@ -29,6 +29,15 @@ export default defineNuxtConfig({
|
|||||||
: process.env.MEILI_SEARCH_INDEXES
|
: process.env.MEILI_SEARCH_INDEXES
|
||||||
: ['production', 'solution'],
|
: ['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',
|
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: {
|
imports: {
|
||||||
dirs: ['types/**'],
|
dirs: ['types/**'],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user