mirror of https://github.com/sgoudham/carbon.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
653 B
JavaScript
28 lines
653 B
JavaScript
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'
|
|
}
|
|
}
|
|
|
|
if (phase === PHASE_DEVELOPMENT_SERVER) {
|
|
return config
|
|
}
|
|
|
|
return withOffline(config)
|
|
}
|