mirror of
https://github.com/theoleuthardt/werkzeugkiste.git
synced 2026-06-13 09:37:53 +00:00
fix: nextjs only reads .env files when using NEXT_PUBLIC_ in front of variables + definition of right .env of root
This commit is contained in:
parent
51befce05d
commit
0d92719258
5 changed files with 20 additions and 3 deletions
|
|
@ -1,9 +1,12 @@
|
|||
import type { NextConfig } from "next";
|
||||
import dotenv from "dotenv";
|
||||
|
||||
dotenv.config({ path: "../.env" });
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: "standalone",
|
||||
env: {
|
||||
backend_url: process.env.BACKEND_URL || "http://localhost:4000",
|
||||
backend_url: process.env.NEXT_PUBLIC_BACKEND_URL,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue