diff --git a/components/page-footer/index.js b/components/page-footer/index.js
index 7df75ba63..abd4b7a8c 100644
--- a/components/page-footer/index.js
+++ b/components/page-footer/index.js
@@ -29,8 +29,7 @@ const PageFooter = () => (
diff --git a/components/site-nav/index.js b/components/site-nav/index.js
index f3f084552..2a5766925 100644
--- a/components/site-nav/index.js
+++ b/components/site-nav/index.js
@@ -11,7 +11,6 @@ const SiteNav = () => (
diff --git a/config/dev.json b/config/dev.json
deleted file mode 100644
index b86da9bd5..000000000
--- a/config/dev.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "GA_SECRET": ""
-}
diff --git a/next.config.js b/next.config.js
index dccde0ff8..d770ec59c 100644
--- a/next.config.js
+++ b/next.config.js
@@ -20,14 +20,20 @@ const { getPathMap } = require("./scripts/path-map");
const loadConfig = (env = 'dev') => {
const configPath = `./config/${env}.json`;
if (!fs.existsSync(configPath)) {
- console.log(`Config file not found: ${configPath}`);
- process.exit(1);
+ console.warn(`Config file not found: ${configPath}. Using environment variables only.`);
}
+
+ const appConfig = {};
- console.log(`Config file found: ${configPath}`);
+ for (let key in process.env) {
+ if (!key.startsWith('ROADMAP_')) {
+ continue;
+ }
+
+ appConfig[key.replace('ROADMAP_', '')] = process.env[key];
+ }
- // @todo stringify the values for webpack - it doesn't understand objects
- return require(configPath);
+ return appConfig;
};
const options = {