Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require('dotenv').config();
- const { PHASE_PRODUCTION_SERVER } =
- process.env.NODE_ENV === 'development'
- ? {}
- : !process.env.NOW
- ? require('next/constants')
- : require('next-server/constants');
- const config = {
- publicRuntimeConfig: {
- endpoint: process.env.ENDPOINT,
- username: process.env.USERNAME,
- password: process.env.PASSWORD
- }
- };
- module.exports = (phase, { defaultConfig }) => {
- if (phase === PHASE_PRODUCTION_SERVER) {
- return config;
- }
- const withCSS = require('@zeit/next-css');
- return withCSS(config);
- };
Add Comment
Please, Sign In to add comment