add environment variable NUXT_DEV_SERVER

This commit is contained in:
Rafi
2023-03-19 12:53:44 +08:00
parent 18a4251714
commit ea69a350f4

View File

@@ -53,7 +53,7 @@ export default defineNuxtConfig({
periodicSyncForUpdates: 20, periodicSyncForUpdates: 20,
}, },
devOptions: { devOptions: {
enabled: true, enabled: false,
type: 'module', type: 'module',
} }
}, },
@@ -83,7 +83,7 @@ export default defineNuxtConfig({
nitro: { nitro: {
devProxy: { devProxy: {
"/api": { "/api": {
target: "http://localhost:8000/api", target: process.env.NUXT_DEV_SERVER ?? 'http://localhost:8000/api',
prependPath: true, prependPath: true,
changeOrigin: true, changeOrigin: true,
} }