diff --git a/.env.production b/.env.production index d428dfe..1116083 100644 --- a/.env.production +++ b/.env.production @@ -1 +1 @@ -NEXT_PUBLIC_URL=https://${VERCEL_URL} +NEXT_PUBLIC_URL=https://$NEXT_PUBLIC_VERCEL_URL diff --git a/next.config.js b/next.config.js index 658404a..1b0a349 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,7 @@ /** @type {import('next').NextConfig} */ +const dotenvExpand = require("dotenv-expand"); + +dotenvExpand.expand({ parsed: { ...process.env } }); const nextConfig = {}; module.exports = nextConfig; diff --git a/package-lock.json b/package-lock.json index ac50789..cfd8b78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@types/react": "18.2.6", "@types/react-dom": "18.2.4", "autoprefixer": "10.4.14", + "dotenv-expand": "^10.0.0", "eslint": "8.41.0", "eslint-config-next": "13.4.3", "leaflet": "^1.9.4", @@ -3519,6 +3520,14 @@ "node": ">=12" } }, + "node_modules/dotenv-expand": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-10.0.0.tgz", + "integrity": "sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==", + "engines": { + "node": ">=12" + } + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", diff --git a/package.json b/package.json index f6274b2..e9673dc 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@types/react": "18.2.6", "@types/react-dom": "18.2.4", "autoprefixer": "10.4.14", + "dotenv-expand": "^10.0.0", "eslint": "8.41.0", "eslint-config-next": "13.4.3", "leaflet": "^1.9.4",