refactor: env config (#769)
This commit is contained in:
parent
9d5dc1bc3d
commit
f892722220
13 changed files with 121 additions and 64 deletions
|
|
@ -3,9 +3,9 @@ import Inspect from 'vite-plugin-inspect'
|
|||
import { isCI, isDevelopment } from 'std-env'
|
||||
import { i18n } from './config/i18n'
|
||||
import { pwa } from './config/pwa'
|
||||
import { isPreview } from './config/env'
|
||||
|
||||
const { resolve } = createResolver(import.meta.url)
|
||||
const isPreview = process.env.PULL_REQUEST === 'true' || process.env.CONTEXT === 'deploy-preview' || process.env.CONTEXT === 'dev'
|
||||
|
||||
export default defineNuxtConfig({
|
||||
typescript: {
|
||||
|
|
@ -90,7 +90,7 @@ export default defineNuxtConfig({
|
|||
inviteToken: '',
|
||||
},
|
||||
public: {
|
||||
env: isCI ? isPreview ? 'staging' : 'production' : 'local',
|
||||
env: '', // set in build-info module
|
||||
pwaEnabled: !isDevelopment || process.env.VITE_DEV_PWA === 'true',
|
||||
translateApi: '',
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue