adding WG_HOST as next public env

This commit is contained in:
Shahrad Elahi
2023-09-25 15:26:34 +03:30
parent 19b525d1e6
commit 2b6083a692
6 changed files with 25 additions and 16 deletions

View File

@@ -1,4 +1,15 @@
module.exports = {
function publicENV(ex = {}) {
Object.entries(process.env)
.filter(([ key ]) => key.startsWith('NEXT_PUBLIC_'))
.forEach(([ key, value ]) => ex[key] = value)
return ex
}
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
transpilePackages: ["ui"],
};
transpilePackages: [],
env: publicENV()
}
module.exports = nextConfig;