diff options
author | poeti8 <ezzati.upt@gmail.com> | 2020-07-25 18:51:35 +0300 |
---|---|---|
committer | poeti8 <ezzati.upt@gmail.com> | 2020-07-25 18:51:35 +0300 |
commit | 4952e88e4f878b11cfdd3ab3f91d811f409c8b57 (patch) | |
tree | 1f736e1b47be55bb9c6ede142451d03140a17daa /next.config.js | |
parent | 29e8e5aa0ae83faaee52748364b726cc4170d8c1 (diff) |
feat: use nextjs public config instead of webpack env
Diffstat (limited to 'next.config.js')
-rw-r--r-- | next.config.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/next.config.js b/next.config.js index 9b0aae5..a6031e2 100644 --- a/next.config.js +++ b/next.config.js @@ -1,10 +1,12 @@ -const { parsed: localEnv } = require("dotenv").config(); -const webpack = require("webpack"); +const env = require("./production-server/env").default; module.exports = { - webpack(config) { - config.plugins.push(new webpack.EnvironmentPlugin(localEnv)); - - return config; + publicRuntimeConfig: { + CONTACT_EMAIL: env.CONTACT_EMAIL, + SITE_NAME: env.SITE_NAME, + DEFAULT_DOMAIN: env.DEFAULT_DOMAIN, + RECAPTCHA_SITE_KEY: env.RECAPTCHA_SITE_KEY, + GOOGLE_ANALYTICS: env.GOOGLE_ANALYTICS, + REPORT_EMAIL: env.REPORT_EMAIL } }; |