diff --git a/next.config.js b/next.config.js index 4c0b96d..408e07d 100644 --- a/next.config.js +++ b/next.config.js @@ -1,23 +1,8 @@ // const { PHASE_DEVELOPMENT_SERVER } = require('next/constants') // const withOffline = require('next-offline') -module.exports = (/* phase { defaultConfig } */) => { - const config = { - async exportPathMap() { - return { - '/about': { page: '/about' }, - '/embed': { page: '/embed' }, - '/index': { page: '/index' }, - '/': { page: '/' } - } - }, - publicRuntimeConfig: { - API_URL: - process.env.NODE_ENV === 'production' - ? 'https://carbon-api.now.sh' - : 'http://localhost:4000' - } +module.exports = { + publicRuntimeConfig: { + API_URL: process.env.API_URL || 'http://localhost:4000' } - - return config } diff --git a/now.json b/now.json index ec80d2b..7a86b86 100644 --- a/now.json +++ b/now.json @@ -12,7 +12,8 @@ ], "build": { "env": { - "NODE_ENV": "production" + "NODE_ENV": "production", + "API_URL": "@carbon_api_url" } }, "github": {