Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thedevs-network/kutt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpoeti8 <ezzati.upt@gmail.com>2020-07-25 18:51:35 +0300
committerpoeti8 <ezzati.upt@gmail.com>2020-07-25 18:51:35 +0300
commit4952e88e4f878b11cfdd3ab3f91d811f409c8b57 (patch)
tree1f736e1b47be55bb9c6ede142451d03140a17daa /next.config.js
parent29e8e5aa0ae83faaee52748364b726cc4170d8c1 (diff)
feat: use nextjs public config instead of webpack env
Diffstat (limited to 'next.config.js')
-rw-r--r--next.config.js14
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
}
};