chore: remote url from env

This commit is contained in:
antony
2024-12-23 15:55:38 +07:00
parent 5614ed542a
commit 9550591048
3 changed files with 33 additions and 7 deletions
+1
View File
@@ -0,0 +1 @@
NUXT_MFE_APP1_HOST=http://localhost:3001
+3 -1
View File
@@ -2,6 +2,8 @@ import { defineNuxtConfig } from "nuxt/config"
import federation from "@originjs/vite-plugin-federation"
import topLevelAwait from "vite-plugin-top-level-await"
const MFE_HOST = process.env.NUXT_MFE_APP1_HOST
export default defineNuxtConfig({
compatibilityDate: "2024-04-03",
devtools: { enabled: false },
@@ -29,7 +31,7 @@ export default defineNuxtConfig({
federation({
name: "host-app",
remotes: {
remote: "http://localhost:3001/_nuxt/remoteEntry.js"
remote: `${MFE_HOST}/_nuxt/remoteEntry.js`
},
shared: ["vue"]
})